Ejemplo n.º 1
0
 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);
     }
 }
Ejemplo n.º 3
0
    // 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);
        }
    }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     _sceneController = GameObject.Find("Main Camera").GetComponent <StartSceneController>();
 }