Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
    // 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;
        });
    }
Ejemplo n.º 4
0
 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);
     }
 }
Ejemplo n.º 5
0
    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;
        }
    }
Ejemplo n.º 6
0
    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;
        }
    }
Ejemplo n.º 7
0
    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);
        }
    }
Ejemplo n.º 8
0
    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;
        }
    }
Ejemplo n.º 9
0
    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);
    }
Ejemplo n.º 10
0
    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;
        }
    }
Ejemplo n.º 11
0
 // Act overnight
 public virtual void Overnight(DrugState state)
 {
 }
Ejemplo n.º 12
0
 // Act while live
 public virtual void Play(DrugState state)
 {
 }
Ejemplo n.º 13
0
 // Apply immediate effects
 public virtual void Apply(DrugState state)
 {
 }