Atavism Version 2018.1AGIS API

atavism.agis.core
Class BuildingResourceAcquireHook

java.lang.Object
  extended by atavism.agis.core.BuildingResourceAcquireHook
All Implemented Interfaces:
AcquireHook, java.io.Serializable

public class BuildingResourceAcquireHook
extends java.lang.Object
implements AcquireHook

An acquire hook for items that turn into a building resource when acquired.

See Also:
Serialized Form

Field Summary
protected  int resourceID
           
 
Constructor Summary
BuildingResourceAcquireHook()
           
BuildingResourceAcquireHook(int resourceID)
           
 
Method Summary
 boolean acquired(OID activatorOid, AgisItem item)
          Adds the item to the Building Resources map for the player and returns true telling the item to be destroyed.
 int getResourceID()
           
static void sendBuildingResources(OID oid, java.util.HashMap<java.lang.String,java.lang.Integer> resources)
          Sends down the map of Building Resources the player has to the client.
 void setResourceID(int resourceID)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resourceID

protected int resourceID
Constructor Detail

BuildingResourceAcquireHook

public BuildingResourceAcquireHook()

BuildingResourceAcquireHook

public BuildingResourceAcquireHook(int resourceID)
Method Detail

setResourceID

public void setResourceID(int resourceID)

getResourceID

public int getResourceID()

acquired

public boolean acquired(OID activatorOid,
                        AgisItem item)
Adds the item to the Building Resources map for the player and returns true telling the item to be destroyed.

Specified by:
acquired in interface AcquireHook

sendBuildingResources

public static void sendBuildingResources(OID oid,
                                         java.util.HashMap<java.lang.String,java.lang.Integer> resources)
Sends down the map of Building Resources the player has to the client. Static function so can be called from anywhere.

Parameters:
oid -
resources -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2018 Dragonsan Studios Sp. z o.o.