// 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); } }
// 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; }