private void Awake()
 {
     _enemy            = GetComponent <EnemyBase>();
     _animator         = GetComponentInChildren <Animator>();
     StateMachine      = new PluggableStateMachine(this);
     WalkingController = GetComponent <WalkingController>();
 }
    public override bool Decide(PluggableStateMachine pluggableStateMachine)
    {
        NavMeshAgent agent = pluggableStateMachine.gameObject.GetComponent <NavMeshAgent>();

        if (agent != null)
        {
        }
        return(false);
    }
Beispiel #3
0
 public override bool Decide(PluggableStateMachine pluggableStateMachine)
 {
     //LocalMinionController minionController = pluggableStateMachine.gameObject.GetComponent<LocalMinionController>();
     //if (minionController != null)
     //{
     //	return minionController.HasFinishedCooking();
     //}
     return(false);
 }
 public override bool Decide(PluggableStateMachine pluggableStateMachine)
 {
     /*
      * LocalMinionController minionController = pluggableStateMachine.gameObject.GetComponent<LocalMinionController>();
      *      if (minionController != null)
      *      {
      *              return minionController.IsCloseToCookingStation(_MininmumDistance);
      *      }*/
     return(false);
 }
Beispiel #5
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // Instantiating the particle effects
     Instantiate(_ParticleEffectPrefab, pluggableStateMachine.gameObject.transform);
 }
Beispiel #6
0
 public override bool Decide(PluggableStateMachine pluggableStateMachine)
 {
     return(Input.GetKeyDown(_KeyToDetect));
 }
Beispiel #7
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // Destroying the gameObject that the state machine is attached to
     Destroy(pluggableStateMachine.gameObject, _TimeBeforeDestroy);
 }
Beispiel #8
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // TODO: Invoke WWise Event
 }
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // The minion controller already knows about the target cooking station
     pluggableStateMachine.gameObject.GetComponent <NavMeshAgent>().speed = 3.5f;
 }
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     Debug.Log(pluggableStateMachine.CurrentState.name + " : " + _TextToPrint);
 }
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     //pluggableStateMachine.gameObject.GetComponent<LocalMinionController>().MoveToHero();
 }
Beispiel #12
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // The position we pass does not matter as this is a local minion controller
     //pluggableStateMachine.gameObject.GetComponent<LocalMinionController>().MoveToTargetGrid(new GridPosition());
 }
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // The minion controller already knows about the target cooking station
     //pluggableStateMachine.gameObject.GetComponent<MinionController>().GetStunned(2);
 }
Beispiel #14
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // TODO: Activate Die Animation
 }
Beispiel #15
0
 public override void Act(PluggableStateMachine pluggableStateMachine)
 {
     // The local minion controller already knows about the target cooking station
     //pluggableStateMachine.gameObject.GetComponent<LocalMinionController>().Cook(null);
 }