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; }
protected override bool performAction(MiningAgent agent, InventoryState state) { if (agent.actionProgress >= GetTotalProgess()) { agent.sticks += 1; return(true); } agent.actionProgress++; return(false); }
protected override bool validateLocation(MiningAgent agent, InventoryState state) { return(Vector3.Distance(agent.transform.position, GameManager.storeLocation) <= GameManager.distanceTolerance); }
protected override bool performAction(MiningAgent agent, InventoryState state) { agent.sticks -= 1; agent.money += GameManager.stickValue; return(true); }
protected override void moveToLocation(MiningAgent agent, InventoryState state) { agent.navAgent.SetDestination(GameManager.storeLocation); }
protected override bool performAction(MiningAgent agent, InventoryState state) { agent.money -= GameManager.axeValue; agent.hasAxe = true; return(true); }
protected override bool validateLocation(MiningAgent agent, InventoryState state) { return(true); }
protected override bool performAction(MiningAgent agent, InventoryState state) { return(false); }
protected override void moveToLocation(MiningAgent agent, InventoryState state) { return; }