private void Awake() { if (Instance == null) { Instance = this; } }
private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Debug.Log("Instance already exists, destroying object"); Destroy(this); } }
// Start is called before the first frame update void Start() { red = panel.GetComponent <Image>().color.r; green = panel.GetComponent <Image>().color.g; blue = panel.GetComponent <Image>().color.b; alfa = 1; start = StartSceneController.getStart(); if (start) { alfa = 1; StartSceneController.start = false; panel.SetActive(true); } else { alfa = 0; panel.SetActive(false); } }
// Use this for initialization void Start() { _sceneController = GameObject.Find("Main Camera").GetComponent <StartSceneController>(); }