Example #1
0
 public ZombieState(Zombie zombie, Animation image)
     : base(zombie.Game)
 {
     this.Image = image;
     Align = new Vector2(0, image.SizeY);
     this.Zombie = zombie;
 }
Example #2
0
 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);
 }
Example #3
0
 public Walk(Zombie zombie, Animation image, float velocity)
     : base(zombie, image)
 {
     this.Velocity = velocity;
 }
Example #4
0
 public Death(Zombie zombie, Animation image, Counter.Timer timer)
     : base(zombie, image)
 {
     this.IsComplete = false;
     this.Timer = timer;
 }
Example #5
0
 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;
        }
Example #7
0
 public virtual void Load()
 {
     this.sprite = new Animation(this.Game, this.Game.Content.Load<Texture2D>(this.assetName), this.Frames);
 }
Example #8
0
        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();
        }