Exemple #1
0
        public virtual void Revive()
        {
            // set full heatlh
            health = 100;

            // reset animation
            ani       = new Burntime.Platform.Graphics.SpriteAnimation(2);
            ani.Speed = 10;
        }
Exemple #2
0
        protected override void AfterDeserialization()
        {
            if (!IsDead)
            {
                ani       = new Burntime.Platform.Graphics.SpriteAnimation(2);
                ani.Speed = 10;
            }
            else
            {
                ani         = new Burntime.Platform.Graphics.SpriteAnimation(5);
                ani.Endless = false;
            }
            aniDelay = new FadingHelper(20);
            base.AfterDeserialization();

            if (body.Object != null && body.Object.Animation != null)
            {
                body.Object.Animation.Progressive = false;
            }
        }
Exemple #3
0
        public virtual void Die()
        {
            // drop items
            Location.Items.DropPosition = Position;
            Items.MoveTo(Location.Items);

            // remove from player empire
            if (Player != null && Player.Character != this)
            {
                Dismiss();
            }

            // reset
            health      = 0;
            ani         = new Burntime.Platform.Graphics.SpriteAnimation(4);
            ani.Endless = false;

            // schedule for respawn
            ClassicGame classic = (ClassicGame)container.Root;

            classic.World.Respawn.Object.Respawn(this);
        }