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"); } }
public TimeValue GetValue(TimeValue.ValueType type) { switch (type) { case TimeValue.ValueType.Seconds: return(Seconds); case TimeValue.ValueType.Turns: return(Turns); case TimeValue.ValueType.Rounds: return(Rounds); default: throw new System.Exception("Unknown time format"); } }