コード例 #1
0
    private void OnSequenceSuccess()
    {
        StrongAttack sa = Object.Instantiate(strongAttack, player.transform.position, Quaternion.identity);

        sa.Init(strongAttackDamage, strongAttackSize, color);
        ResetAttackStats();
    }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (isAttacking && other.tag == "Player")
        {
            // Debug.Log(other.name + ": " + other.tag);

            opponentRB          = other.GetComponent <Rigidbody>();
            opponentHealth      = other.GetComponent <PlayerHealth>();
            opponentMovement    = other.GetComponent <CharacterMovement>();
            opponentAnim        = other.GetComponent <Animator>();
            opponentSAtk_Script = other.GetComponentInChildren <StrongAttack>();

            DealDamage();
            opponentSAtk_Script.Knockback();
            Animate();
        }
    }