Пример #1
0
 public override void UpdateState(MiningAgent agent, InventoryState state)
 {
     state.money      = agent.money;
     state.logs       = agent.logs;
     state.sticks     = agent.sticks;
     state.ore        = agent.ore;
     state.hasAxe     = agent.hasAxe;
     state.hasPickaxe = agent.hasPickaxe;
 }
Пример #2
0
 protected override bool performAction(MiningAgent agent, InventoryState state)
 {
     if (agent.actionProgress >= GetTotalProgess())
     {
         agent.sticks += 1;
         return(true);
     }
     agent.actionProgress++;
     return(false);
 }
Пример #3
0
 protected override bool validateLocation(MiningAgent agent, InventoryState state)
 {
     return(Vector3.Distance(agent.transform.position, GameManager.storeLocation) <= GameManager.distanceTolerance);
 }
Пример #4
0
 protected override bool performAction(MiningAgent agent, InventoryState state)
 {
     agent.sticks -= 1;
     agent.money  += GameManager.stickValue;
     return(true);
 }
Пример #5
0
 protected override void moveToLocation(MiningAgent agent, InventoryState state)
 {
     agent.navAgent.SetDestination(GameManager.storeLocation);
 }
Пример #6
0
 protected override bool performAction(MiningAgent agent, InventoryState state)
 {
     agent.money -= GameManager.axeValue;
     agent.hasAxe = true;
     return(true);
 }
Пример #7
0
 protected override bool validateLocation(MiningAgent agent, InventoryState state)
 {
     return(true);
 }
Пример #8
0
 protected override bool performAction(MiningAgent agent, InventoryState state)
 {
     return(false);
 }
Пример #9
0
 protected override void moveToLocation(MiningAgent agent, InventoryState state)
 {
     return;
 }