Exemple #1
0
 void Power_Down()
 {
     for (int i = 0; i < fm.MovingFriends.Count; i++)
     {
         if (fm.MovingFriends[i].name == "StartFriend" || fm.MovingFriends[i].name == "Frodo(Clone)")
         {
             Gun gun = fm.MovingFriends[i].GetComponentInChildren <Gun>();
             gun.ShotDelay = 2.0f;
         }
         else if (fm.MovingFriends[i].name == "Tube(Clone)")
         {
             Barrier bar = fm.MovingFriends[i].GetComponentInChildren <Barrier>();
             bar.Delay = 2.0f;
         }
         else if (fm.MovingFriends[i].name == "Ryan(Clone)")
         {
             LaserGun lg = fm.MovingFriends[i].GetComponentInChildren <LaserGun>();
             lg.Thickness = 2.0f;
         }
         else if (fm.MovingFriends[i].name == "Neo(Clone)")
         {
             MissileLauncher ml = fm.MovingFriends[i].GetComponentInChildren <MissileLauncher>();
             ml.MissileSpeed = 4.0f;
         }
         else if (fm.MovingFriends[i].name == "Muzi(Clone)")
         {
             BombThrower bt = fm.MovingFriends[i].GetComponentInChildren <BombThrower>();
             bt.AttackDelay = 2.0f;
         }
         else if (fm.MovingFriends[i].name == "JayG(Clone)")
         {
             LightningAttack la = fm.MovingFriends[i].GetComponentInChildren <LightningAttack>();
             la.AttackRange     = 3.0f;
             la.AttackDelayTime = 1.0f;
         }
         else if (fm.MovingFriends[i].name == "Peach(Clone)")
         {
             StarShooter ss = fm.MovingFriends[i].GetComponentInChildren <StarShooter>();
             ss.ShotDelay = 2.0f;
         }
         else // Con
         {
         }
     }
 }
Exemple #2
0
    void Initialize()
    {
        // When we get more moves, add more
        SwordSwingRT     rt     = GameObject.FindGameObjectWithTag("Sword").GetComponent <SwordSwingRT>();
        LightningAttack  light  = GameObject.FindGameObjectWithTag("Sword").GetComponent <LightningAttack>();
        PlasmaBeamAttack plasma = GameObject.FindGameObjectWithTag("Sword").GetComponent <PlasmaBeamAttack>();

        skill = new SkillSlot[3];

        for (int i = 0; i < skill.Length; i++)
        {
            skill[i]       = new SkillSlot();
            skill[i].skill = rt;
        }
        skill[0].SetKey(KeyCode.Q);
        skill[1].SetKey(KeyCode.E);
        skill[2].SetKey(KeyCode.R);
    }