Пример #1
0
 // Use this for initialization
 void Start()
 {
     gm                 = GameObject.FindGameObjectWithTag("GM").GetComponent <EwanT_LevelManager>();
     _Renderer          = gameObject.GetComponent <Renderer>();
     _Renderer.material = startMaterial;
     soundController    = GetComponent <AudioSource>();
 }
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(instance);
     }
     else
     {
         Destroy(gameObject);
     }
 }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        GameObject go = GameObject.Find("LevelManager");

        currentLevelManager = go.GetComponent <EwanT_LevelManager>();
    }
 // Use this for initialization
 void Start()
 {
     gm = GameObject.FindGameObjectWithTag("GM").GetComponent <EwanT_LevelManager>();
     transform.position = gm.lastCheckPointPos;
 }