示例#1
0
    void Transmit()
    {
        GameObject transmission = GameObject.FindGameObjectWithTag("transmission");

        if (transmission != null)
        {
            Move transmissionMove = transmission.GetComponent <Move>();
            if (transmissionMove != null)
            {
                transmissionMove.Activate();
                GetComponent <Animator>().SetTrigger("transmit");

                GameController.Instance.Player = transmission;

                Deactivate();
            }
            else
            {
                Debug.Log("No Move script found on transmission object!");
            }
        }
        else
        {
            Debug.Log("Object with tag transmission not found!");
        }
    }