Beispiel #1
0
 public void Boost(Collectable.Boost boost)
 {
     print(boost);
     print((int)boost);
     powerups [(int)boost] += boost.GetTime();
     print("done1");
     boost.GetStat().ChangeStat(boost.GetAmount());
 }
Beispiel #2
0
    public void UndoPowerup(Collectable.Boost boost)
    {
        print("done");
        Stat  s = boost.GetStat();
        float a = boost.GetAmount();

        a = a * -1;

        s.ChangeStat(a);
        print("done2");
    }
Beispiel #3
0
        public static float GetAmount(this Collectable.Boost boost)
        {
            int b = (int)boost;

            if (b == 1)
            {
                return(2);
            }
            else if (b == 2)
            {
                return(10);
            }
            else
            {
                return(-1);
            }
        }
Beispiel #4
0
        public static PlayerController.Stat GetStat(this Collectable.Boost boost)
        {
            int b = (int)boost;

            if (b == 1)
            {
                return(PlayerController.Stat.speed);
            }
            else if (b == 2)
            {
                return(PlayerController.Stat.speed);
            }
            else
            {
                return(PlayerController.Stat.none);
            }
        }
Beispiel #5
0
        public static int GetTime(this Collectable.Boost boost)
        {
            int b = (int)boost;

            if (b == 1)
            {
                return(10);
            }
            else if (b == 2)
            {
                return(1);
            }
            else
            {
                return(-1);
            }
        }