Exemplo n.º 1
0
 void Awake()
 {
     if (GameObject.FindWithTag("RainbowManager"))
     {
         if (GameObject.FindWithTag("RainbowManager") != this.gameObject)
         {
             ColorShift rainbowManager = GameObject.FindWithTag("RainbowManager").GetComponent <ColorShift>();
             for (int i = 0; i < targets.Length; i++)
             {
                 rainbowManager.AddRenderer(targets[i]);
             }
             Destroy(gameObject);
         }
     }
     else
     {
         nextColor    = currentColor + 1;
         nextStep     = stepTime + Time.time;
         targetStarts = new Color[targets.Length];
         for (int i = 0; i < targets.Length; i++)
         {
             targetStarts[i] = targets[i].material.GetColor("_Color");
         }
     }
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Awake()
    {
        if (jinx.isMain)
        {
            CreatePuppet(jinx);
            jinx.puppetOn = true;
            jinx.puppet.UpdatePuppet(jinx.position, talkingDepth);


            //Create Rainbow UI effect
            rainbowManager = Instantiate(jinxColorShifter).GetComponent <ColorShift>();
            DontDestroyOnLoad(rainbowManager.gameObject);
            GameObject[] allUIFrames = GameObject.FindGameObjectsWithTag("UIFrame");
            for (int i = 0; i < allUIFrames.Length; i++)
            {
                rainbowManager.AddRenderer(GetRenderer(allUIFrames[i]));
            }

            rainbowManager.AddRenderer(jinx.puppet.puppetUnderlay);
        }
        LoadPassage(storyStart);
    }