Exemple #1
0
 public static CorruptColour GetOppositeCorruptColour(CorruptColour c)
 {
     if (c == CorruptColour.Blue)
     {
         return(CorruptColour.Red);
     }
     else
     {
         return(CorruptColour.Blue);
     }
 }
Exemple #2
0
 public static Color GetCorrespondingColour(CorruptColour c)
 {
     if (c == CorruptColour.Blue)
     {
         return(Color.blue);
     }
     else
     {
         return(Color.red);
     }
 }
Exemple #3
0
        IEnumerator moveExplosionObj(CorruptExplosion data)
        {
            GameObject    obj = Instantiate(data.prefab, data.sender.transform.position, data.sender.transform.rotation);
            CorruptColour c   = GameHandler.GetRandomCorruptColour();

            obj.GetComponent <Corrupt>().corruptColour = c;
            //Debug.Log(c);
            float Rnd_R = UnityEngine.Random.Range(0f, 360);

            obj.transform.Rotate(new Vector3(0f, 0f, Rnd_R));
            for (; ;)
            {
                yield return(null);

                if (PlayerUI.singleton.isPaused)
                {
                    continue;
                }
                obj.transform.Translate(obj.transform.up * Time.fixedDeltaTime * data.speed * 0.1f);
            }
        }
Exemple #4
0
 void OnChangeCorruptColour(object sender, EventArgs e)
 {
     playerCorruptColour = GetOppositeCorruptColour(playerCorruptColour);
 }