コード例 #1
0
ファイル: CanvasManager.cs プロジェクト: Killir/Testovoe
    public void RuleButtons(int index)
    {
        IMovementRule movementRule = null;

        switch (index)
        {
        case 1:
            movementRule = new MovementRule1();
            break;

        case 2:
            movementRule = new MovementRule2();
            break;

        case 3:
            movementRule = new MovementRule3();
            break;
        }

        GameManager.singleton.SetHighlight(highlightToggle.isOn);
        GameManager.singleton.SetMovementRule(movementRule);
        GameManager.singleton.StartGame();
    }
コード例 #2
0
ファイル: GameManager.cs プロジェクト: Killir/Testovoe
 public void SetMovementRule(IMovementRule movementRule)
 {
     currentMovementRule = movementRule;
 }