public void Boost(Collectable.Boost boost) { print(boost); print((int)boost); powerups [(int)boost] += boost.GetTime(); print("done1"); boost.GetStat().ChangeStat(boost.GetAmount()); }
public void UndoPowerup(Collectable.Boost boost) { print("done"); Stat s = boost.GetStat(); float a = boost.GetAmount(); a = a * -1; s.ChangeStat(a); print("done2"); }
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); } }
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); } }
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); } }