Exemplo n.º 1
0
    // Start is called before the first frame update
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
            return;
        }

        if (instance == this) return;
        Destroy(gameObject);

    }
Exemplo n.º 2
0
    void Start()
    {
        m_CurrentAttackDelay = m_AttackDelay;

        if (tag != "Player")
        {
            m_Player1 = GameObject.Find("Player1");
            m_Player2 = GameObject.Find("Player2");
            m_AttackChoise = GetComponent<AttackChoise>();
        }
        GameObject tempCam = GameObject.Find("CameraContainer");
        m_mss = tempCam.GetComponent<MusicSoundScript>();
    }