public void Ringstate(RingStates ringstate) { switch (ringstate) { case RingStates.random: SetRandomRingstate(); break; case RingStates.red: transform.parent = RingContainer.transform.Find("red rings"); if (main.LightState == ShootTheRing.LightStates.green || main.LightState == ShootTheRing.LightStates.blue || main.LightState == ShootTheRing.LightStates.white) { animator.SetTrigger("red not active"); } else { SwitchOnOff(); animator.SetTrigger("red rings"); } break; case RingStates.blue: transform.parent = RingContainer.transform.Find("blue rings"); if (main.LightState == ShootTheRing.LightStates.green || main.LightState == ShootTheRing.LightStates.red || main.LightState == ShootTheRing.LightStates.white) { animator.SetTrigger("blue not active"); } else { SwitchOnOff(); animator.SetTrigger("blue rings"); } break; case RingStates.green: transform.parent = RingContainer.transform.Find("green rings"); if (main.LightState == ShootTheRing.LightStates.red || main.LightState == ShootTheRing.LightStates.blue || main.LightState == ShootTheRing.LightStates.white) { animator.SetTrigger("green not active"); } else { SwitchOnOff(); animator.SetTrigger("green rings"); } break; case RingStates.white: transform.parent = RingContainer.transform.Find("white rings"); SwitchOnOff(); break; } }
public void SetRandomRingstate() { ringstate = RingHandler.ringStates[Random.Range(0, 9)]; Debug.Log(ringstate.ToString()); Ringstate(ringstate); }
public RingReqPackage(RingStates state, string deviceId, int userId) : base(MessageTypes.RingReq) { State = state; DeviceId = deviceId; UserId = userId; }