示例#1
0
        /// <summary>
        /// Flips the direction the customer is walking in.
        /// Used to turn when a customer reaches the end of a platform.
        /// </summary>
        private void TurnAround()
        {
            var shape = Shape.AsDynamicShape();
            var xDir  = shape.Direction.X;

            shape.Direction = new Vec2F(xDir * -1, 0);
            direction       = shape.Direction.X < 0 ? CustomerDirection.Left : CustomerDirection.Right;
        }
 public void GetCustomerStridesBothDirections(CustomerDirection direction)
 {
     var strides = imageContainer.GetCustomerStride(direction);
 }
示例#3
0
 public Customer(Shape shape, IBaseImage image) : base(shape, image)
 {
     Shape.AsDynamicShape().Direction = new Vec2F();
     imageContainer = ImageContainer.GetInstance();
     direction      = CustomerDirection.Right;
 }
示例#4
0
 /// <summary>
 /// Returns a walking animation for the customer instances.
 /// </summary>
 /// <returns>Walking animation of customer depending on the CustomerDirection</returns>
 public IBaseImage GetCustomerStride(CustomerDirection direction)
 {
     return(customerStrides[(int)direction]);
 }