Esempio n. 1
0
 private void OnTriggerStay(Collider other)
 {
     if (other.tag == "MetaPlayer")
     {
         //THEN HES DEAAD
         metaGameManager.ResetMetaPlayerPosition();
     }
     else if (other.tag == "Player")
     {
         other.transform.position = Vector3.zero;
     }
 }
Esempio n. 2
0
    private void OnCollisionEnter(Collision collision)
    {
        if (collision.gameObject.tag == "Player" || collision.gameObject.tag == "MetaPlayer")
        {
            switch (pType)
            {
            case Platformtype.MOVING:
            case Platformtype.STATIC:
            default:
                collision.transform.parent = gameObject.transform;
                break;

            case Platformtype.DEATH:
                //THEN HES DEAAD
                metaGameManager.ResetMetaPlayerPosition();
                break;
            }
        }
    }