private void Harvest(AiController aiController, SmartObject smartObject) { Debug.Log("Harvesting"); }
public override void Act(AiController aiController, SmartObject smartObject) { Harvest(aiController, smartObject); }
public override void Act(AiController aiController, SmartObject smartObject) { }
public override void Initialize(SmartObject smartObject) { smartObject.AddSmartActionToCollection(GameManager.Instance.globalSpriteContainer.spriteCollection["Harvest"], OnClickHarvest); }
public override void Act(AiController aiController, SmartObject smartObject) { Attack(aiController, smartObject); }
public override void Initialize(SmartObject smartObject) { smartObject.AddSmartActionToCollection(GameManager.Instance.globalSpriteContainer.spriteCollection["Shooting"], OnCliCkPracticeShooting); }
public override void Act(AiController aiController, SmartObject smartObject) { throw new System.NotImplementedException(); }
private void Attack(AiController aiController, SmartObject smartObject) { aiController.combatController.Attack(smartObject); }
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"); }
public override void Initialize(SmartObject smartObject) { throw new System.NotImplementedException(); }
private bool InRange(SmartObject smartObject) { return((smartObject.transform.position - transform.position).magnitude <= smartObject.stoppingDistance); }
public override void Act(AiController aiController, SmartObject smartObject) { PickUp(aiController, smartObject); }
private void PickUp(AiController aiController, SmartObject smartObject) { //event EventRelay.OnItemPickedUp(aiController, smartObject as Item); }
/// <summary> /// Adds all the required contextual right click actions for object. /// </summary> public abstract void Initialize(SmartObject smartObject);
/// <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);