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