Ejemplo n.º 1
0
    //call this method for time to move forward one step
    //TIME MOVES FORWARD LIKE SO:
    // - move everything needed to move 1 unit, update positions
    // - set fire to objects needed to set fire
    // - move away any fires needed to move away
    // - update the slider
    // - animate move everthing needed to animate

    public void StepTimeForward()
    {
        wbScript.DisableButtonForATime(moveAnimationSpeed);
        allItemsOnGrid = gManager.GetGameObjectsOnGrid();

        // - move everything needed to move 1 unit, update positions
        mmScript.MoveAllNeeded();

        // - set fire to objects needed to set fire
        fmScript.SpreadFire();


        fmScript.MoveAwayAllFiresIfNeeded(timeUnitsElapsed);

        UpdateMeter();

        timeUnitsElapsed++;         //tick time by 1


        //only freeze things on fire
        gManager.FreezeObjectsOnFire();

        CheckIfWin();
    }