Пример #1
0
 public BonusItem(Bonustype Bonustype,float power, int remainUsetime)
 {
     this.Bonustype = Bonustype;
     this.power = power;
     this.remainUsetime = remainUsetime;
     Slot = Slot.bonus;
 }
Пример #2
0
 public BonusItem(Bonustype Bonustype,float power, int remainUsetime)
 {
     this.Bonustype = Bonustype;
     this.power = power;
     this.remainUsetime = remainUsetime;
     cost = Formuls.CostBonus(Bonustype, MainController.Instance.PlayerData.Level) * (remainUsetime/ BONUS_USE_TIME);
     IconSprite = UnityEngine.Resources.Load<Sprite>("sprites/BonusItem/" + Bonustype.ToString());
     Slot = Slot.bonus;
 }
Пример #3
0
 public static int CostBonus(Bonustype Bonustype, int lvl)
 {
     return 500*lvl;
 }
Пример #4
0
        private void Halt()
        {
            if (!halt.IsRunning)
                halt.Start();

            if (Helper.Rng(31337) % 2 == 0)
                type = Bonustype.Nuke;
            else
                type = Bonustype.Life;

            bonusPosition.X = Game.WIDTH + bonus.Width;
            bonusPosition.Y = Helper.Rng(Game.HEIGHT - bonus.Height);

            haltDuration = Helper.Rng2(10000,20000);

            // Check if it needs to be drawn.
            if (halt.ElapsedMilliseconds > haltDuration)
            {
                state = Bonusstate.Traverse;
                halt.Reset();
            }
        }