Пример #1
0
    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;
        }
    }
Пример #2
0
 public void ReceiveStream(ResourceStream ReceivingStream, IOStreamDir ReceivingDir)
 {
     RemoveFromStream(ReceivingDir);
     Stream    = ReceivingStream;
     animColor = ReceivingStream._streamColor;
     this.ManageStream();
 }
Пример #3
0
 public void ResetStream()
 {
     myModifiers.Clear();
     myColor    = streamColor.notSet;
     myState    = streamState.unchanged;
     startValue = 0f;
     finalValue = 0f;
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 public void SetStream(float InitialValue, streamColor myStartColor, streamState myStartState)
 {
     startValue = InitialValue;
     myColor    = myStartColor;
     myState    = myStartState;
 }