Esempio n. 1
0
 public MultiTimeValue GetDeltaTime()
 {
     return(new MultiTimeValue()
     {
         Seconds = TimeValue.Seconds(World.FixTime.DeltaTime),
         Turns = TimeValue.Turns(World.TurnTime.DeltaTime),
         Rounds = TimeValue.Rounds(World.RoundTime.DeltaTime),
     });
 }
Esempio n. 2
0
    public TimeValue GetElapsedTime(TimeValue.ValueType type)
    {
        switch (type)
        {
        case TimeValue.ValueType.Seconds:
            return(TimeValue.Seconds(World.FixTime.ElapsedTime));

        case TimeValue.ValueType.Turns:
            return(TimeValue.Turns(World.TurnTime.ElapsedTime));

        case TimeValue.ValueType.Rounds:
            return(TimeValue.Rounds(World.RoundTime.ElapsedTime));

        default:
            throw new System.Exception("Unknown time format");
        }
    }