コード例 #1
0
 /// <summary>
 /// Starts the RepeatingWorker Function and sets the TimesPerSec variable
 /// </summary>
 /// <param name="TimesPerSec">How many times a second should the RepeatingWorker Function be run</param>
 /// <returns>The RunningState of the RepeatinWorker Function</returns>
 internal Boolean StartRepeatingWorker(Int32 TimesPerSec)
 {
     Log.dbg("Starting the repeating function");
     //Stop it if its running
     StopRepeatingWorker();
     //Set the new value
     SetRepeatTimesPerSecond(TimesPerSec);
     //Start it and return the result
     return(StartRepeatingWorker());
 }
コード例 #2
0
 /// <summary>
 /// Stop the RepeatingWorkerFunction
 /// </summary>
 /// <returns>The RunningState of the RepeatinWorker Function</returns>
 internal Boolean StopRepeatingWorker()
 {
     try
     {
         Log.dbg("Cancelling the repeating function");
         this.CancelInvoke("RepeatingWorkerWrapper");
         _RepeatRunning = false;
     }
     catch (Exception)
     {
         Log.err("Unable to cancel the repeating function");
         //throw;
     }
     return(_RepeatRunning);
 }
コード例 #3
0
 /// <summary>
 /// Starts the Repeating worker
 /// </summary>
 /// <returns>The RunningState of the RepeatinWorker Function</returns>
 internal Boolean StartRepeatingWorker()
 {
     try
     {
         Log.dbg("Invoking the repeating function");
         this.InvokeRepeating("RepeatingWorkerWrapper", _RepeatInitialWait, RepeatingWorkerRate);
         _RepeatRunning = true;
     }
     catch (Exception)
     {
         Log.err("Unable to invoke the repeating function");
         //throw;
     }
     return(_RepeatRunning);
 }
コード例 #4
0
 /// <summary>
 /// Extension Function - this will run only once each time the monobehaviour is awakened
 ///
 /// Added this so you can put your GUI initialisation code in here. Running GUI initialisation stuff in Awake/Start will throw an error
 /// </summary>
 internal virtual void OnGUIOnceOnly()
 {
     Log.dbg("Running OnGUI OnceOnly Code");
 }
コード例 #5
0
 /// <summary>
 /// Unity Help: This function is called when the MonoBehaviour will be destroyed..
 ///
 /// Trigger: Override this for destruction and cleanup code
 ///          See this for info on order of execuction: http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html
 /// </summary>
 internal virtual void OnDestroy()
 {
     Log.dbg("Destroying MBExtended");
 }
コード例 #6
0
 /// <summary>
 /// Unity: Start is called on the frame when a script is enabled just before any of the Update methods is called the first time.
 ///
 /// Trigger: This is the last thing that happens before the scene starts doing stuff
 ///          See this for info on order of execuction: http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html
 /// </summary>
 internal virtual void Start()
 {
     Log.dbg("New MBExtended Started");
 }
コード例 #7
0
        //See this for info on order of execuction
        //  http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html

        /// <summary>
        /// Unity Help: Awake is called when the script instance is being loaded.
        ///
        /// Trigger: Override this for initialization Code - this is before the Start Event
        ///          See this for info on order of execuction: http://docs.unity3d.com/Documentation/Manual/ExecutionOrder.html
        /// </summary>
        internal virtual void Awake()
        {
            Log.dbg("New MBExtended Awakened");
        }