Esempio n. 1
0
        public EntityStatic(EntityMobile actor)
        {
            Type = actor.Type;

            Direction = actor.Direction.Current;
            Flags     = actor.Flags;
        }
Esempio n. 2
0
        public void MoveDelay(EntityMobile actor, ushort duration)
        {
            if (actor.IsMoving)
            {
                return;
            }

            actor.Timer.Start(duration, false);
        }
        public EntityMobile(EntityMobile other)
        {
            this.Type = other.Type;

            this.Position  = other.Position;
            this.Direction = other.Direction;

            this.Flags = other.Flags;
            this.Timer = other.Timer;
        }
Esempio n. 4
0
        public void MoveFacing(EntityMobile actor, ushort duration, Direction direction)
        {
            if (actor.IsMoving)
            {
                return;
            }

            actor.Position.Next  = actor.Position.Current;
            actor.Direction.Next = direction;
            actor.Timer.Start(duration, false);
        }
Esempio n. 5
0
        public void MoveCancel(EntityMobile actor)
        {
            if (!actor.IsMoving)
            {
                return;
            }

            actor.Position.Next  = actor.Position.Current;
            actor.Direction.Next = actor.Direction.Current;
            actor.Timer.Reset();
        }
Esempio n. 6
0
 public void MoveDown(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Down, Direction.LEFT, duration);
 }
Esempio n. 7
0
 public void MoveRight(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Right, Direction.LEFT, duration);
 }