Esempio n. 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);
 }
Esempio n. 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;
 }
Esempio n. 3
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     Renderer.enabled = entity.Get <bool>(Input);
 }
Esempio n. 4
0
 public override void Update(Golem entity, bool dirty, ref bool running)
 {
     entity.Set(Output, !entity.Get <bool>(Input));
 }