Esempio n. 1
0
    /// <summary>
    ///
    /// </summary>
    public void StartAutoMove(AutoMoveMode mode, float time)
    {
        autoMove = mode;
        switch (autoMove)
        {
        case AutoMoveMode.Frontward:
            Direction = Directions.DIR_BACKWARD;
            break;

        case AutoMoveMode.Left:
            Direction = Directions.DIR_LEFT;
            break;

        case AutoMoveMode.Right:
            Direction = Directions.DIR_RIGHT;
            break;

        case AutoMoveMode.Backward:
            Direction = Directions.DIR_FRONT;
            break;
        }
        autoMoveTime    = time;
        stepSpriteIndex = 1;
    }
Esempio n. 2
0
 public void StopAutoMove()
 {
     autoMove        = AutoMoveMode.Stop;
     stepSpriteIndex = 0;
 }