public ZombieState(Zombie zombie, Animation image) : base(zombie.Game) { this.Image = image; Align = new Vector2(0, image.SizeY); this.Zombie = zombie; }
public Attack(Zombie zombie, Animation image, int damage, float attSpeed) : base(zombie, image) { this.Damage = damage; AttackTimer = new Counter.Timer(this.Game, (int)(1000f / attSpeed)); AttackTimer.OnMeet += new Counter.EventOnCounterMeet(OnAttackTimerTick); }
public Walk(Zombie zombie, Animation image, float velocity) : base(zombie, image) { this.Velocity = velocity; }
public Death(Zombie zombie, Animation image, Counter.Timer timer) : base(zombie, image) { this.IsComplete = false; this.Timer = timer; }
public Death(Zombie zombie, Animation image, int timeToLive) : base(zombie, image) { this.IsComplete = false; Timer = new Counter.Timer(this.Game, timeToLive); }
public Animation(Animation anim) : base(anim) { this.frames = anim.frames; this.activeFrame = anim.activeFrame; this.delay = anim.delay; this.lastTime = anim.lastTime; this.currentTime = anim.currentTime; this.enable = anim.enable; this.defaultFrame = anim.defaultFrame; }
public virtual void Load() { this.sprite = new Animation(this.Game, this.Game.Content.Load<Texture2D>(this.assetName), this.Frames); }
public override void Initialize() { animation = SpriteBank.GetAnimation("Images\\Plants\\Sun"); vBank = Vector2.Zero; done = false; toBank = false; isClicked = false; lost = false; this.autoRemoveDelay = 5000; this.autoremoveTimer = new Counter.Timer(this.Game, this.autoRemoveDelay); this.autoremoveTimer.OnMeet += new Counter.EventOnCounterMeet(autoremoveTimer_OnMeet); base.Initialize(); }