예제 #1
0
        public EntityStatic(EntityMobile actor)
        {
            Type = actor.Type;

            Direction = actor.Direction.Current;
            Flags     = actor.Flags;
        }
예제 #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;
        }
예제 #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);
        }
예제 #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();
        }
예제 #6
0
 public void MoveDown(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Down, Direction.LEFT, duration);
 }
예제 #7
0
 public void MoveRight(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Right, Direction.LEFT, duration);
 }