Beispiel #1
0
 void EndDash()
 {
     im.SetForwardMotionEnabled(true);
     isDashing = false;
     rec.DisableInvinciblePermanent();
     rec.EnableInvincible();
     keom.isEnabled = false;
 }
Beispiel #2
0
    public void StartCircleAttack(Vector3 maxDims, Vector3 growSpeeds)
    {
        AudioSource.PlayClipAtPoint(blastClip, Vector3.back * 500.0f, 0.2f);

        rec.EnableInvincible();

        GameObject       circleAttackObject = Instantiate(CircleAttackObject) as GameObject;
        CircleAttackGrow cg = circleAttackObject.GetComponent <CircleAttackGrow> ();

        cg.maxDims    = maxDims;
        cg.growSpeeds = growSpeeds * attackSpeedModifier;
        circleAttackObject.transform.rotation   = Quaternion.Euler(Vector3.right * 90.0f);
        circleAttackObject.transform.localScale = new Vector3(10.0f, 60.0f, 10.0f);
        circleAttackObject.transform.position   = new Vector3(transform.position.x, transform.position.y, -250.0f) + transform.up.normalized * 80.0f;
        circleAttackObject.GetComponent <SnapToObject> ().target = gameObject;
    }