Beispiel #1
0
 public Name(string _name, bool _used = false, bool _died = false, float _timeSurvived = 0.0f, int _boxesDelivered = 0, MethodOfDeath _howDied = MethodOfDeath.SURVIVED)
 {
     name           = _name;
     used           = _used;
     died           = _died;
     timeSurvived   = _timeSurvived;
     boxesDelivered = _boxesDelivered;
     howDied        = _howDied;
 }
Beispiel #2
0
    private string GetDeathString(MethodOfDeath howRobotDied)
    {
        switch (howRobotDied)
        {
        case MethodOfDeath.DEATH_BY_CRUSHER:
            return("and was crushed after ");

        case MethodOfDeath.DEATH_BY_FIRE:
            return("and got fired after ");

        case MethodOfDeath.DEATH_BY_PIT:
            return("and fell in a pit after ");

        case MethodOfDeath.DEATH_BY_BOMB:
            return("and was obliterated after ");

        default:
            return("and continued to live? after ");
        }
    }
Beispiel #3
0
    public void AddRobotSurvivalTime(string name, float timeSurvived, bool died = false, MethodOfDeath howRobotDied = MethodOfDeath.SURVIVED)
    {
        Name robotName = robotNames [name];

        robotNames [name] = new Name(name, true, died, robotName.timeSurvived + timeSurvived, robotName.boxesDelivered, howRobotDied);
    }