Пример #1
0
    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);
                }
            }
        }
    }
Пример #2
0
 public void ToIdleState()
 {
     nyx.StopMovement();
     nyx.ChangeStateTo(nyx.idle_state);
 }
Пример #3
0
 public void ToIdleState()
 {
     nyx.agent.enabled = true; //Enable navmesh agent collisions
     nyx.ChangeStateTo(nyx.idle_state);
 }
Пример #4
0
 public void ToIdleState()
 {
     nyx.ChangeStateTo(nyx.idle_state);
 }
Пример #5
0
 public void ToKillingState()
 {
     nyx.ChangeStateTo(nyx.killing_state);
 }
Пример #6
0
 public void ToWalkingState()
 {
     nyx.ChangeStateTo(nyx.walking_state);
 }