public void ApplyState(NetStream state)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " ApplyState ");
     }
     targetHeat = ((!NetBoolEncoder.ApplyState(state)) ? 0f : 0.9f);
 }
Exemple #2
0
 public int CalculateMaxDeltaSizeInBits()
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Calc max delta size in bits ");
     }
     return(2 * NetBoolEncoder.CalculateMaxDeltaSizeInBits());
 }
 public void CollectState(NetStream stream)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " CollectState ");
     }
     NetBoolEncoder.CollectState(stream, targetHeat > 0f);
 }
 public int CalculateMaxDeltaSizeInBits()
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Calc Max Delta ");
     }
     return(NetBoolEncoder.CalculateMaxDeltaSizeInBits());
 }
Exemple #5
0
 public int CalculateMaxDeltaSizeInBits()
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Calculate Delta Max in Bits ");
     }
     return(NetSignal.encoder.CalculateMaxDeltaSizeInBits() + NetBoolEncoder.CalculateMaxDeltaSizeInBits());
 }
Exemple #6
0
 public void ApplyState(NetStream state)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Applying State ");
     }
     ApplyState(NetBoolEncoder.ApplyState(state), NetBoolEncoder.ApplyState(state));
 }
 public void CalculateDelta(NetStream state0, NetStream state1, NetStream delta)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Calc Data ");
     }
     NetBoolEncoder.CalculateDelta(state0, state1, delta);
 }
 public void AddDelta(NetStream state0, NetStream delta, NetStream result)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Add Delta ");
     }
     NetBoolEncoder.AddDelta(state0, delta, result);
 }
 public void CollectState(NetStream stream)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Collect State ");
     }
     NetBoolEncoder.CollectState(stream, output.value >= 0.5f);
 }
Exemple #10
0
 public void ApplyLerpedState(NetStream state0, NetStream state1, float mix)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Apply Lerped State ");
     }
     ApplyState(NetBoolEncoder.ApplyLerpedState(state0, state1, mix), NetBoolEncoder.ApplyLerpedState(state0, state1, mix));
 }
 public void CollectState(NetStream stream)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " CollectState ");
     }
     NetBoolEncoder.CollectState(stream, shattered);
 }
 public void ApplyLerpedState(NetStream state0, NetStream state1, float mix)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " ApplyLerpedState ");
     }
     targetHeat = ((!NetBoolEncoder.ApplyLerpedState(state0, state1, mix)) ? 0f : 0.9f);
 }
Exemple #13
0
 public void CollectState(NetStream stream)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Collected State ");
     }
     NetBoolEncoder.CollectState(stream, leftJoint != null);
     NetBoolEncoder.CollectState(stream, rightJoint != null);
 }
Exemple #14
0
 public void CollectState(NetStream stream)
 {
     if (showDebug)
     {
         Debug.Log(base.name + " Collect State ");
     }
     NetSignal.encoder.CollectState(stream, Mathf.InverseLerp(ratchet.minValue, ratchet.maxValue, ratchet.GetValue()));
     NetBoolEncoder.CollectState(stream, firing);
 }
Exemple #15
0
    public void ApplyState(NetStream state)
    {
        bool          flag          = NetBoolEncoder.ApplyState(state);
        bool          flag2         = NetBoolEncoder.ApplyState(state);
        FireworkState fireworkState = flag ? FireworkState.Shot : (flag2 ? FireworkState.Exploded : FireworkState.Inactive);
        float         newPhase      = NetSignal.encoder.ApplyState(state);

        if (fireworkState != 0 && this.state == FireworkState.Inactive)
        {
            Fireworks.instance.MarkUsed(this);
        }
        if (fireworkState == FireworkState.Inactive && this.state != 0)
        {
            Fireworks.instance.Kill(this);
        }
        Apply(fireworkState, newPhase);
    }
Exemple #16
0
 public void ApplyState(NetStream state)
 {
     targetHeat = ((!NetBoolEncoder.ApplyState(state)) ? 0f : 0.9f);
 }
Exemple #17
0
 public int CalculateMaxDeltaSizeInBits()
 {
     return(2 * NetBoolEncoder.CalculateMaxDeltaSizeInBits() + NetSignal.encoder.CalculateMaxDeltaSizeInBits());
 }
Exemple #18
0
 public void ApplyState(NetStream state)
 {
     Apply(NetSignal.encoder.ApplyState(state), NetBoolEncoder.ApplyState(state));
 }
Exemple #19
0
 public void CollectState(NetStream stream)
 {
     NetSignal.encoder.CollectState(stream, Mathf.InverseLerp(ratchet.minValue, ratchet.maxValue, ratchet.GetValue()));
     NetBoolEncoder.CollectState(stream, firing);
 }
 public int CalculateMaxDeltaSizeInBits()
 {
     return(NetBoolEncoder.CalculateMaxDeltaSizeInBits());
 }
Exemple #21
0
 public void CollectState(NetStream stream)
 {
     stream.Write((uint)state, 2);
     NetBoolEncoder.CollectState(stream, ground != null && ground.isOpen);
 }
 public void CalculateDelta(NetStream state0, NetStream state1, NetStream delta)
 {
     NetBoolEncoder.CalculateDelta(state0, state1, delta);
 }
 public void AddDelta(NetStream state0, NetStream delta, NetStream result)
 {
     NetBoolEncoder.AddDelta(state0, delta, result);
 }
 public void ApplyState(NetStream state)
 {
     ApplyState(NetBoolEncoder.ApplyState(state));
 }
 public void ApplyLerpedState(NetStream state0, NetStream state1, float mix)
 {
     ApplyState(NetBoolEncoder.ApplyLerpedState(state0, state1, mix));
 }
 public void CollectState(NetStream stream)
 {
     NetBoolEncoder.CollectState(stream, isActive);
 }
 public void ApplyState(NetStream state)
 {
     ApplyRemote(NetBoolEncoder.ApplyState(state));
     ApplyScreen(NetBoolEncoder.ApplyState(state));
 }
 public void CollectState(NetStream stream)
 {
     NetBoolEncoder.CollectState(stream, netBody.isVisible);
     NetBoolEncoder.CollectState(stream, screen.isVisible);
 }
 public void CollectState(NetStream stream)
 {
     NetBoolEncoder.CollectState(stream, output.value >= 0.5f);
 }
Exemple #30
0
 public void CollectState(NetStream stream)
 {
     NetBoolEncoder.CollectState(stream, state == FireworkState.Shot);
     NetBoolEncoder.CollectState(stream, state == FireworkState.Exploded);
     NetSignal.encoder.CollectState(stream, life);
 }