예제 #1
0
    // Game over, the timer is not done but the player ran out of gas.
    public void GameOver(LossCondition condition)
    {
        Player.EndOfLevel(false);
        Started = false;
        Debug.Log("Game Over");
        GameOverPanel.SetActive(true);

        switch (condition)
        {
        case LossCondition.fuel:
            GameOverFuelText.SetActive(true);
            GameOverKarmaText.SetActive(false);
            break;

        case LossCondition.karma:
            GameOverFuelText.SetActive(false);
            GameOverKarmaText.SetActive(true);
            break;
        }
    }
예제 #2
0
        private void WriteLossCondition(BinaryWriter writer, LossCondition lc)
        {
            writer.Write((byte)lc.Type);
            if (lc.Type == LossConditionType.LossStandard)
            {
                return;
            }

            switch (lc.Type)
            {
            case LossConditionType.LossTown:
            case LossConditionType.LossHero:
                WritePosition(writer, lc.Position);
                break;

            case LossConditionType.TimeExpires:
                writer.Write(lc.Value);
                break;
            }
        }
예제 #3
0
 public bool ConditionCheck()
 {
     VictoryCondition.CheckCondition();
     LossCondition.CheckCondition();
     return(ConditionResult());
 }