本文整理汇总了C#中Entry.set_time方法的典型用法代码示例。如果您正苦于以下问题:C# Entry.set_time方法的具体用法?C# Entry.set_time怎么用?C# Entry.set_time使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Entry
的用法示例。
在下文中一共展示了Entry.set_time方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: add_entry
// Add antry not from Acrive vessel
// NEEDS TO BE CHANGE!!!!
public void add_entry(Entry.Situations S, Vessel ves, String message)
{
KDebug.Log("Add message from the Mission class: " + message, KDebug.Type.CHANGE);
Entry e = new Entry();
e.add(S, message);
if (ves != null)
{
e.set_time(ves.missionTime);
} // If not ActiveVessel time is set to 0, we need to take time from the previous entry
else if (entries.Count > 0)
{
Entry last = entries[entries.Count - 1];
// we add fraction of a second
e.set_time(last.get_time() + 0.1);
}
this.add_entry(e);
}
示例2: add_user_entry
// Add entry from GUI
public void add_user_entry( String message)
{
Entry e = new Entry();
e.add(Entry.Situations.USER, message);
double mission_time = this.get_time();
double current_time = Planetarium.GetUniversalTime();
//HighLogic.CurrentGame.flightState.universalTime;
KDebug.Log("Add from gui, mission_time:" + mission_time.ToString() + " Planetarium.GetUniversalTime():" + Planetarium.GetUniversalTime().ToString() + " flightState.universalTime:" + HighLogic.CurrentGame.flightState.universalTime.ToString(), KDebug.Type.CHANGE);
e.set_time( current_time - mission_time ); // For some reason this does not work...
this.add_entry(e);
}