コード例 #1
0
 private void Harvest(AiController aiController, SmartObject smartObject)
 {
     Debug.Log("Harvesting");
 }
コード例 #2
0
 public override void Act(AiController aiController, SmartObject smartObject)
 {
     Harvest(aiController, smartObject);
 }
コード例 #3
0
 public override void Act(AiController aiController, SmartObject smartObject)
 {
 }
コード例 #4
0
 public override void Initialize(SmartObject smartObject)
 {
     smartObject.AddSmartActionToCollection(GameManager.Instance.globalSpriteContainer.spriteCollection["Harvest"], OnClickHarvest);
 }
コード例 #5
0
 public override void Act(AiController aiController, SmartObject smartObject)
 {
     Attack(aiController, smartObject);
 }
コード例 #6
0
 public override void Initialize(SmartObject smartObject)
 {
     smartObject.AddSmartActionToCollection(GameManager.Instance.globalSpriteContainer.spriteCollection["Shooting"], OnCliCkPracticeShooting);
 }
コード例 #7
0
 public override void Act(AiController aiController, SmartObject smartObject)
 {
     throw new System.NotImplementedException();
 }
コード例 #8
0
 private void Attack(AiController aiController, SmartObject smartObject)
 {
     aiController.combatController.Attack(smartObject);
 }
コード例 #9
0
 private void Inspect(AiController aiController, SmartObject smartObject) //action logic, ai is the activator that is currently selected, smartObject is the object activated from a right click action (SmartAction)
 {
     Debug.Log("Inspecting");
 }
コード例 #10
0
 public override void Initialize(SmartObject smartObject)
 {
     throw new System.NotImplementedException();
 }
コード例 #11
0
 private bool InRange(SmartObject smartObject)
 {
     return((smartObject.transform.position - transform.position).magnitude <= smartObject.stoppingDistance);
 }
コード例 #12
0
 public override void Act(AiController aiController, SmartObject smartObject)
 {
     PickUp(aiController, smartObject);
 }
コード例 #13
0
 private void PickUp(AiController aiController, SmartObject smartObject)
 {
     //event
     EventRelay.OnItemPickedUp(aiController, smartObject as Item);
 }
コード例 #14
0
 /// <summary>
 /// Adds all the required contextual right click actions for object.
 /// </summary>
 public abstract void Initialize(SmartObject smartObject);
コード例 #15
0
 /// <summary>
 /// Agent starts the action once he is in range of stopping distance.
 /// Stopping distance is defined in the SmartObject component. Can be set from Initialize method as well.
 /// </summary>
 /// <param name="aiController"></param>
 /// <param name="smartObject"></param>
 public abstract void Act(AiController aiController, SmartObject smartObject);