public override void Play(DrugState state) { Color color = state.slug.body.color; state.slug.body.CrossFadeColor(new Color(color.r * colorMod, color.g * colorMod, color.b * colorMod), colorDuration, false, false); state.slug.salt.gameObject.SetActive(true); }
public override void Play(DrugState state) { if (state.strength - state.resistance > maxDosage) { state.slug.flowers.SetActive(true); state.slug.flowers.transform.position = Camera.main.ScreenToWorldPoint(state.slug.transform.position + Vector3.forward * 20); } }
// Act while live public override void Play(DrugState state) { Sprite originalMouth = state.slug.mouth.sprite; Sprite originalEyes = state.slug.eyes.sprite; state.slug.mouth.sprite = sneezeMouth; state.slug.eyes.sprite = sneezeEyes; state.slug.audio.PlayOneShot(sneezeSound); DayManager.Delay(sneezeSound.length / state.slug.audio.pitch, delegate { state.slug.mouth.sprite = originalMouth; state.slug.eyes.sprite = originalEyes; }); }
public override void Apply(DrugState drugState) { foreach (Drug drug in currentDrugs) { // Each drug gets applied random number of times // 50% chance of one dose // 25% chance of two doses // ... do { Debug.Log("Applying " + drug.GetType().Name); drugState.slug.ApplyDrug(drug); } while (Random.value > .25f); } }
public override void Apply(DrugState drugState) { KatState state = drugState as KatState; state.slug.ears.gameObject.SetActive(true); if (state.originalEyes == null) { state.originalEyes = state.slug.eyes.sprite; state.slug.eyes.sprite = eyesSprite; } if (state.originalMouth == null) { state.originalMouth = state.slug.mouth.sprite; state.slug.eyes.sprite = eyesSprite; state.slug.mouth.sprite = mouthSprite; } }
public override void Apply(DrugState drugState) { AnimeState state = drugState as AnimeState; state.slug.audio.pitch *= 1.1f; state.slug.blush.gameObject.SetActive(true); state.slug.blush.transform.localScale = new Vector2(1 + state.strength / 100f, 1 + state.strength / 10f); if (state.originalEyes == null) { state.originalEyes = state.slug.eyes.sprite; state.slug.eyes.sprite = eyesSprite; } if (state.originalMouth == null) { state.originalMouth = state.slug.mouth.sprite; state.slug.mouth.sprite = mouthSprite; DrugState testosterone = state.slug.drugs.Where(d => d.drug.GetType().Name == "Testosterone").FirstOrDefault(); state.slug.mouth.sprite = testosterone == null ? mouthSprite : (testosterone.drug as Testosterone).frown; } }
public override void Overnight(DrugState drugState) { TestosteroneState state = drugState as TestosteroneState; state.slug.reverb.enabled = state.strength > 0; state.slug.reverb.reverbPreset = state.strength < 5 ? lowDose : state.strength < 10 ? medDose : highDose; if (state.strength >= 5) { state.slug.shell.gameObject.SetActive(true); } else if (state.strength == 0) { state.slug.moustache.gameObject.SetActive(true); state.slug.eyes.sprite = state.originalEyes; state.slug.mouth.sprite = state.originalMouth; state.slug.shell.gameObject.SetActive(false); } }
public override void Apply(DrugState drugState) { TestosteroneState state = drugState as TestosteroneState; state.slug.reverb.enabled = true; state.slug.reverb.reverbPreset = state.strength < 5 ? lowDose : state.strength < 10 ? medDose : highDose; state.slug.moustache.gameObject.SetActive(true); if (state.originalEyes == null) { state.originalEyes = state.slug.eyes.sprite; state.slug.eyes.sprite = eyes; } if (state.originalMouth == null) { state.originalMouth = state.slug.mouth.sprite; state.slug.mouth.sprite = state.slug.drugs.Where(d => d.drug.GetType().Name == "Anime").Count() > 0 ? frown : smile; } }
public override void Overnight(DrugState drugState) { AnimeState state = drugState as AnimeState; state.overnightChange = false; if (state.strength >= 5) { if (!state.slug.wings.gameObject.activeSelf) { state.overnightChange = true; } state.slug.wings.gameObject.SetActive(true); } else if (state.strength == 0) { state.slug.wings.gameObject.SetActive(false); state.slug.blush.gameObject.SetActive(false); state.slug.eyes.sprite = state.originalEyes; state.slug.mouth.sprite = state.originalMouth; } state.slug.audio.pitch = Mathf.Pow(1.1f, state.strength); state.slug.blush.transform.localScale = new Vector2(1 + state.strength / 100f, 1 + state.strength / 10f); }
public override void Overnight(DrugState drugState) { KatState state = drugState as KatState; state.overnightChange = false; if (state.strength >= 5) { if (!state.slug.tail.gameObject.activeSelf) { state.overnightChange = true; } state.slug.tail.gameObject.SetActive(true); state.slug.whiskers.gameObject.SetActive(true); } else if (state.strength == 0) { state.slug.tail.gameObject.SetActive(false); state.slug.whiskers.gameObject.SetActive(false); state.slug.ears.gameObject.SetActive(false); state.slug.eyes.sprite = state.originalEyes; state.slug.mouth.sprite = state.originalMouth; } }
// Act overnight public virtual void Overnight(DrugState state) { }
// Act while live public virtual void Play(DrugState state) { }
// Apply immediate effects public virtual void Apply(DrugState state) { }