Ejemplo n.º 1
0
    public int id = 1; // ids are 1 2 3 4 5 6, so be careful

    void Awake()
    {
        for (int j = 0; j < initialNodes.Length; j++)
        {
            initialNodes[j].GetComponent <Renderer>().enabled = false;
        }

        initialBallSpline = new AnimationSpline(WrapMode.Clamp);

        for (int i = 0; i < finalNodes.Length; i++)
        {
            finalNodes[i].GetComponent <Renderer>().enabled = false;
        }

        finalBallSpline = new AnimationSpline(WrapMode.Clamp);

        cueController = CueController.FindObjectOfType(typeof(CueController)) as CueController;

        GetComponent <Renderer>().enabled = false;
    }
Ejemplo n.º 2
0
    IEnumerator WaitAndFindCueController(Preloader preloader)
    {
        cueController = null;

        while (!preloader.isDone)
        {
            yield return(null);
        }

        while (cueController == null)
        {
            cueController = CueController.FindObjectOfType <CueController>();

            yield return(null);
        }

        yield return(new WaitForEndOfFrame());

        cueController.enabled = true;                 // this is the golden line that shows the game to our players

        StartCoroutine(UpdateSlaveStillPositions(0)); // 0th shot
    }