void OnTriggerEnter(Collider col) { if (col.tag == Tags.player && col.name != Objects.barion) { if (col.name == Objects.cosmo) //Cosmo { CosmoController cosmo = col.gameObject.GetComponent <CosmoController>(); if (cosmo.GetState() == cosmo.idle_state) { cosmo.ChangeStateTo(cosmo.chained_state); } } if (col.name == Objects.nyx) //Nyx { NyxController nyx = col.gameObject.GetComponent <NyxController>(); if (nyx.GetState() == nyx.idle_state) { nyx.ChangeStateTo(nyx.chained_state); } } } }
public void ToIdleState() { nyx.StopMovement(); nyx.ChangeStateTo(nyx.idle_state); }
public void ToIdleState() { nyx.agent.enabled = true; //Enable navmesh agent collisions nyx.ChangeStateTo(nyx.idle_state); }
public void ToIdleState() { nyx.ChangeStateTo(nyx.idle_state); }
public void ToKillingState() { nyx.ChangeStateTo(nyx.killing_state); }
public void ToWalkingState() { nyx.ChangeStateTo(nyx.walking_state); }