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); }
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); }
public override void Act(PluggableStateMachine pluggableStateMachine) { // Instantiating the particle effects Instantiate(_ParticleEffectPrefab, pluggableStateMachine.gameObject.transform); }
public override bool Decide(PluggableStateMachine pluggableStateMachine) { return(Input.GetKeyDown(_KeyToDetect)); }
public override void Act(PluggableStateMachine pluggableStateMachine) { // Destroying the gameObject that the state machine is attached to Destroy(pluggableStateMachine.gameObject, _TimeBeforeDestroy); }
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(); }
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); }
public override void Act(PluggableStateMachine pluggableStateMachine) { // TODO: Activate Die Animation }
public override void Act(PluggableStateMachine pluggableStateMachine) { // The local minion controller already knows about the target cooking station //pluggableStateMachine.gameObject.GetComponent<LocalMinionController>().Cook(null); }