Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        attackSound = gameObject.transform.Find("rayOrigin").GetComponent<AudioSource>();
        attackSound.volume = 0.8f;
        attackSound.Stop();
        attackVFX = gameObject.transform.Find("character/Attack_VFX").GetComponent<ParticleSystem>();
        attackVFX.playOnAwake = false;
        blockVFX = gameObject.transform.Find("character/Block").GetComponent<ParticleSystem>();
        blockVFX.playOnAwake = false;

        pi = gameObject.GetComponent<PlayerInfo>(); //Gets this players PlayerInfo script information.
        cc = gameObject.GetComponent<CharacterController>(); //Gets this players CharacterController information
        animator = transform.Find("character").GetComponent<Animator>();
        attackCD = new CooldownTimer (attackCoolDown, true); //creates a cooldown for the attack.
        counterCD = new CooldownTimer (counterCoolDown); //creates a cooldown for the counter
        counterDur = new CooldownTimer (counterDuration, true);

        counterCD.forceCooldownOver();
    }