예제 #1
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     if (dirty)
     {
         running = entity.Get <bool>(Enabled);
     }
     entity.Set(Output, Mathf.Sin(Frequency * Time.time) * Amplitude);
 }
예제 #2
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     if (dirty)
     {
         current        = entity.Get <float>(Input);
         deltaPerSecond = current / Duration;
     }
     else
     {
         current = Mathf.MoveTowards(current, 0f, deltaPerSecond * Time.smoothDeltaTime);
     }
     running = current != 0f;
 }
예제 #3
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     Renderer.enabled = entity.Get <bool>(Input);
 }
예제 #4
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     entity.Set(Output, !entity.Get <bool>(Input));
 }