Playmaker FeedbackNOTE: This board is no longer active and will be removed soon. Please use the Bug Report tool inside PlayMaker or the PlayMaker Forums instead. Thanks! |
|
Links: Online Manual Version History Roadmap FAQ |
GetSystemDateTime
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved. using System; namespace HutongGames.PlayMaker.Actions { [ActionCategory(ActionCategory.Time)] [Tooltip("Gets system date and time info and stores it in a string. An optional format string gives you a lot of control over the formatting.")] public class GetSystemDateTime : FsmStateAction { [UIHint(UIHint.Variable)] [Tooltip("Store System DateTime as a string.")] public FsmString storeString; [Tooltip("Optional format string. E.g., MM/dd/yyyy HH:mm")] public FsmString format; public bool everyFrame; public override void Reset() { storeString = null; format = "MM/dd/yyyy HH:mm"; } public override void OnEnter() { DoGetTimestring(); if (!everyFrame) Finish(); } public override void OnUpdate() { DoGetTimestring(); } void DoGetTimestring() { storeString.Value = DateTime.Now.ToString(format.Value); } } } |
Powered by FogBugz