Пример #1
0
    // Use this for initialization
    void Start()
    {
        boxTools = new BoxTools(0, 3, this.OnBoxMerged);
        actions  = new[] {
            UserActionFactory.Left(boxTools.MergeLeft),
            UserActionFactory.Right(boxTools.MergeRight),
            UserActionFactory.Up(boxTools.MergeUp),
            UserActionFactory.Down(boxTools.MergeDown),
        };

        this.stateSavables = new StateSavable[] { score, playTime };

        MouseState.InitCurrent();

        gameConfig = GameConfigTools.Difficulty2Config(GameState.Current.Difficulty);
        bombCount  = 0;
        SetProgressActive(true);

        SetDefaultMaxTimeRemain();
        ResetTimer();

        score.Reset();

        AddBox();
        UpdatePosition();
    }
Пример #2
0
    void Start()
    {
        gameConfig = GameConfigTools.Difficulty2Config(GameState.Current.Difficulty);
        bombCost   = gameConfig.InitialBombCost;

        SetBombCost(bombCost);
    }
Пример #3
0
 public void CreateRange_Test2()
 {
     CA.AreEqual(new ulong[] { 2, 2, 4 }, GameConfigTools.CreateRange(2));
 }
Пример #4
0
 public void CreateRange_Test3()
 {
     CA.AreEqual(new ulong[] { 2, 2, 2, 2, 4, 4, 8 }, GameConfigTools.CreateRange(3));
 }
Пример #5
0
 public void CreateRange_Test1()
 {
     CA.AreEqual(new ulong[] { 2 }, GameConfigTools.CreateRange(1));
 }