Ejemplo n.º 1
0
    public override Coroutine CreateStatus()
    {
        SpriteRenderer[] sprites = movement.GetComponentsInChildren <SpriteRenderer>();
        Array.ForEach(sprites, s => s.color = color);

        movement.Speed *= percentage;
        return(MonoBevahiourExtension.StartLerp(interactibleObject, 0, time, time, ReturnOrginSpeed, null));
    }
 internal void Kill()
 {
     AudioSource.PlayClipAtPoint(deathSnd, transform.position);
     MonoBevahiourExtension.StartLerp(this, rb2d.velocity, Vector3.zero, 0.3f, () => rb2d.bodyType = RigidbodyType2D.Static, (x) => rb2d.velocity = x);
     hair.StopEmittingCurrentHairs();
     animator.SetTrigger("death");
     isAlive = false;
 }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     width = 2f;
     MonoBevahiourExtension.StartLerp(this, width, 0, expireTime, null, UpdateLaserWidth);
 }