コード例 #1
0
        public void MovementSetup()
        {
            switch (movement)
            {
            case Movement.Line:
                movementModule = new LinearModule(Game);
                break;

            case Movement.SlantingLine:
                movementModule = new SlantingLineModule(Game);
                break;

            case Movement.SmallZigzag:
                movementModule = new SmallZigZagModule(Game);
                break;

            case Movement.MediumZigzag:
                movementModule = new MediumZigZagModule(Game);
                break;

            case Movement.BigZigzag:
                movementModule = new BigZigZagModule(Game);
                break;

            case Movement.Following:
                movementModule = new FollowingModule(Game);
                break;

            case Movement.CrossOver:
                movementModule = new CrossOverModule(Game);
                break;

            case Movement.Stopping:
                movementModule = new StoppingModule(Game, false);
                break;

            case Movement.FullStop:
                movementModule = new StoppingModule(Game, true);
                break;

            case Movement.RightHorizontal:
                movementModule = new HorizontalModule(Game, true);
                break;

            case Movement.LeftHorizontal:
                movementModule = new HorizontalModule(Game, false);
                break;

            case Movement.SearchAndLockOn:
                movementModule = new SearchAndLockOnModule(Game);
                break;

            case Movement.AI:
                break;

            default:
                throw new ArgumentException("Movement not found");
            }
            movementModule.Setup(this);
        }
コード例 #2
0
 public void SetBossMovement(float yPos)
 {
     movementModule = new StoppingModule(Game, true, yPos, 0);
     movementModule.Setup(this);
 }