public override void Create() { this.StreamOutputs = SetOutputs; int color = Random.Range(0, 3); switch (color) { case 0: initialColor = streamColor.blue; break; case 1: initialColor = streamColor.green; break; case 2: initialColor = streamColor.red; break; default: initialColor = streamColor.notSet; break; } }
public void ReceiveStream(ResourceStream ReceivingStream, IOStreamDir ReceivingDir) { RemoveFromStream(ReceivingDir); Stream = ReceivingStream; animColor = ReceivingStream._streamColor; this.ManageStream(); }
public void ResetStream() { myModifiers.Clear(); myColor = streamColor.notSet; myState = streamState.unchanged; startValue = 0f; finalValue = 0f; }
public static ResourceStream getStream(float value, streamState state, streamColor color) { if (unUsedPool.Count > 0) { //Debug.Log (unUsedPool.Count + usedPool.Count); ResourceStream returnStream = unUsedPool [0]; unUsedPool.Remove(returnStream); returnStream.SetStream(value, color, state); return(returnStream); } else { ResourceStream returnStream = new ResourceStream(value, color, state); usedPool.Add(returnStream); Debug.Log(unUsedPool.Count + usedPool.Count); return(returnStream); } }
public void SetStream(float InitialValue, streamColor myStartColor, streamState myStartState) { startValue = InitialValue; myColor = myStartColor; myState = myStartState; }