public MultiTimeValue GetDeltaTime() { return(new MultiTimeValue() { Seconds = TimeValue.Seconds(World.FixTime.DeltaTime), Turns = TimeValue.Turns(World.TurnTime.DeltaTime), Rounds = TimeValue.Rounds(World.RoundTime.DeltaTime), }); }
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"); } }