Example #1
0
        public void ShouldConstructWithLedAllOneTypeWhenGivenSingleColor()
        {
            var effect = new Breathing(Color.Red);

            Assert.AreEqual(Led.All, effect.Led);
            Assert.AreEqual(BreathingType.One, effect.Type);
        }
Example #2
0
        public void ShouldConstructWithLedAllTwoTypeWhenGivenTwoColors()
        {
            var effect = new Breathing(Color.Red, Color.Blue);

            Assert.AreEqual(Led.All, effect.Led);
            Assert.AreEqual(BreathingType.Two, effect.Type);
        }
 /*
 *	States:
 *		0 - Initial
 *		1 - No action 5 minutes or improper needle decomp
 *		2 - Correct needle decomp, baby healthy
 *		3 - No action 10 minutes, or improper needle decomp x2
 */
 protected virtual void Awake()
 {
     babyBreath = GameObject.FindGameObjectWithTag ("Baby").GetComponent<Breathing> ();
     babyBody = GameObject.FindGameObjectWithTag("BabyBody");
     heartMonitor = GameObject.Find("HeartMonitor").GetComponent<SWP_HeartRateMonitor>();
     InitialState();
     decompTimer = 300f;
     deathTimer = 600f;
     babyMaterial = babyBody.renderer.material;
     babyMaterial.SetFloat ("_Blend", 0.0f);
     mouthTarget = GameObject.Find ("mouthTarget").transform;
     //TODO: Fix this, currently Setting this in inspector to avoid null ref.
     //		GameObject.Find ("endotrachealTube").transform.parent = mouthTarget;
 }
Example #4
0
        public void ShouldConstructWithCorrectParameters()
        {
            const Led Led = Led.Logo;
            const BreathingType Type = BreathingType.Two;
            var first = Color.Red;
            var second = Color.Blue;

            var effect = new Breathing(Led, Type, first, second);

            Assert.AreEqual(Led, effect.Led);
            Assert.AreEqual(Type, effect.Type);
            Assert.AreEqual(first, effect.First);
            Assert.AreEqual(second, effect.Second);
        }
Example #5
0
 /// <summary>
 /// Sets a breathing effect on the mouse.
 /// </summary>
 /// <param name="effect">An instance of the <see cref="Breathing" /> effect.</param>
 public void SetBreathing(Breathing effect)
 {
     SetGuid(NativeWrapper.CreateMouseEffect(Effect.Breathing, effect));
 }
Example #6
0
 /// <summary>
 /// Sets a breathing effect on the mouse pad.
 /// </summary>
 /// <param name="effect">An instance of the <see cref="Breathing" /> struct.</param>
 public void SetBreathing(Breathing effect)
 {
     SetGuid(NativeWrapper.CreateMousepadEffect(effect));
 }
 public void Set(Breathing effect)
 {
     SetBreathing(effect);
 }
Example #8
0
 /// <summary>
 /// Creates a breathing effect for the keyboard.
 /// </summary>
 /// <param name="effect">Effect options.</param>
 /// <returns>A <see cref="Guid" /> for the created effect.</returns>
 internal static Guid CreateKeyboardEffect(Breathing effect)
 {
     return(CreateKeyboardEffect(Effect.Breathing, effect));
 }
Example #9
0
 /// <summary>
 /// Sets a breathing effect on this device.
 /// </summary>
 /// <param name="effect">Effect options.</param>
 public void SetBreathing(Breathing effect)
 {
     SetGuid(NativeWrapper.CreateDeviceEffect(DeviceId, Effect.Breathing, effect));
 }
Example #10
0
 /// <summary>
 /// Sets a breathing effect on the keyboard.
 /// </summary>
 /// <param name="effect">Effect options.</param>
 public void SetBreathing(Breathing effect)
 {
     SetGuid(NativeWrapper.CreateKeyboardEffect(effect));
 }
Example #11
0
 // Start is called before the first frame update
 void Awake()
 {
     Instance = this;
     audio    = GetComponent <AudioSource>();
 }