Exemplo n.º 1
0
    void OnAttack(Transform monster)
    {
        gameManager.stagePoint += 100;

        rigid.AddForce(Vector2.up * 10, ForceMode2D.Impulse);

        MonsterMove monsterMove = monster.GetComponent<MonsterMove>();
        monsterMove.OnDamaged();
        PlaySound("ATTACK");
        audioSource.Play();
    }
Exemplo n.º 2
0
    void OnAttack(Transform monster)
    {
        //Point
        gameManager.stagePoint += 1;

        //Reaction Force
        rigid.AddForce(Vector2.up * Time.deltaTime * 150, ForceMode2D.Impulse);

        //Monster Die
        MonsterMove monsterMove = monster.GetComponent <MonsterMove>();

        monsterMove.OnDamaged();

        //Sound
        PlayeSound(audioAttack);
    }