Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (this_timerController == null)
     {
         this_timerController = (TimerControllerScript)FindObjectOfType(typeof(TimerControllerScript));
         Debug.Log("Tried to grab the object, in update, it's not present anywhere in scene");
     }
 }
Ejemplo n.º 2
0
    void Start()
    {
        Debug.Log("----- Start function for Timers! -------");



        TimerController = GameObject.FindGameObjectWithTag("TimerController");

        this_timerController = (TimerControllerScript)FindObjectOfType(typeof(TimerControllerScript));



        if (my_fader == null)
        {
            Debug.Log("Fader not found!");
        }
        if (TimerController == null)
        {
            Debug.Log("TimerController gameobject not found! ");
        }

        if (this_timerController == null)
        {
            if (TimerController != null)
            {
                this_timerController = TimerController.GetComponent <TimerControllerScript>();
            }
            else
            {
                Debug.Log("TimerController gameobject not found! ");
            }
            if (this_timerController == null)
            {
                Debug.Log("Timercontroller script not grabbed from the timerController obj");
            }
        }
        else
        {
            Debug.Log("Found the timercontroller! ");
            if (isLocalPlayer)
            {
                Debug.Log("Local player is now registering! ");
                CmdRegisterThisPlayer(this.gameObject);
            }
        }
    }