Beispiel #1
0
 /// <summary>
 /// Utility method for toggling state of the heat emitter.
 /// </summary>
 /// <param name="activate">Boolean which indicates whether the heat emitter is enabled.</param>
 public void ToggleEmissions(bool activate)
 {
     if (activate)
     {
         EmitHeatTimer.Play();
     }
     else
     {
         EmitHeatTimer.Pause();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Callback method for enabling/disabling the voxel mesh heat emissions.
 /// </summary>
 /// <param name="enableVoxelMesh">Boolean indicating whether the voxel mesh should be enabled.</param>
 public void ToggleVoxelMesh(bool enableVoxelMesh)
 {
     if (HeatEmissionPollTimer != null)
     {
         if (enableVoxelMesh)
         {
             HeatEmissionPollTimer.Play();
         }
         else
         {
             HeatEmissionPollTimer.Pause();
         }
     }
 }
Beispiel #3
0
    /// <summary>
    /// Helper method which toggles the timer on or off.
    /// </summary>
    /// <param name="startPoll">Boolean which indicates whether the timer should be activated.</param>
    /// <param name="resetTime">Boolean which indicates whether the timer should be reset.</param>
    public virtual void TogglePolling(bool startPoll, bool resetTime)
    {
        if (startPoll)
        {
            PollTimer.Play();
        }
        else
        {
            PollTimer.Pause();
        }

        if (resetTime)
        {
            PollTimer.Reset();
        }
    }