示例#1
0
        /// <summary>
        /// Exclusively performs the character position change operation.
        /// </summary>
        /// <param name="positionChange">Character position change information.</param>
        /// <returns>Task used to track the operations completion.</returns>
        private Task<ActorResponse> DoAdvancePosition(PositionChange positionChange)
        {
            this.Position = new Quadrilateral(this.Position.Corner + positionChange.Delta, this.Position.Diagonal);
            this.Gravity.IsGrounded = positionChange.Grounded;

            return CachedResponse;
        }
示例#2
0
 /// <summary>
 /// Initializes a new Platform instance.
 /// </summary>
 /// <param name="orientation">Platform orientation information.</param>
 /// <param name="position">Players rectangular positions.</param>
 public Platform(PlatformOrientation orientation, Quadrilateral position)
 {
     this.Orientation = orientation;
     this.Position = position;
 }