Ejemplo n.º 1
0
    void Start()
    {
        globalSoundManager = GlobalSoundManager.Get();
        globalSoundManager.Play(prepare);

        text          = GetComponent <Text>();
        remainSeconds = 10;

        StartCoroutine(StartAnimation());
    }
Ejemplo n.º 2
0
 private void CreateSingleton()
 {
     if (Inst == null)
     {
         Inst = this;
     }
     else
     {
         Destroy(this);
     }
 }
    //
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
    void Awake()
    {
        globalSoundManager = transform.Find("GlobalSoundManager").GetComponent <GlobalSoundManager>();
        playerStatus       = GetComponent <NetworkPlayerStatus>();

        PhotonNetwork.autoJoinLobby = true;

        HandleMainUIEvents();
        HandleBrowseServerUIEvents();
        HandleCreateServerUIEvents();
        HandleWaitingRoomUIEvents();

        loginUI.SetActive(true);
    }
 void Awake()
 {
     globalSoundManager = GlobalSoundManager.Get();
 }
Ejemplo n.º 6
0
 private void Awake()
 {
     DontDestroyOnLoad(gameObject); //can be accessed anywhere
     instance = this;
 }