Ejemplo n.º 1
0
    private void CreateAttackEffect()//AttackEffect 애니메이션에서 호출
    {
        if (monsterBoss == 0)
        {
            GameObject AttackEffect = Instantiate(Resources.Load("Monster/Prefabs/MonsterAttackEffect")) as GameObject; //몬스터공격이펙트 오브젝트생성
            AttackEffect.GetComponent <MonsterAttackEffect>().monsterNum = monsterNum;                                  //몬스터 번호 동기화
            if (monsterBoss == 0)
            {
                AttackEffect.GetComponent <MonsterAttackEffect>().boss = false;//몬스터 번호 동기화
            }
            else
            {
                AttackEffect.GetComponent <MonsterAttackEffect>().boss = true;             //몬스터 번호 동기화
            }
            AttackEffect.GetComponent <MonsterAttackEffect>().xScale = attackEffectXScale; //몬스터 AttackEffect 크기
            AttackEffect.GetComponent <MonsterAttackEffect>().yScale = attackEffectYScale; //몬스터 AttackEffect 크기
            CreateDamageUI(player.gameObject, gameObject, false, false, true, 1.5f);
        }
        else
        {
            switch (skillManager.randomSkill)
            {
            case 0:
                skillManager.UsingBuffer(skillManager.randomEffect);
                break;

            case 1:
                skillManager.UsingTargeting(skillManager.randomEffect);
                break;

            case 2:
                skillManager.UsingWideArea(skillManager.randomEffect);
                break;

            case 3:
                skillManager.CallMonster(skillManager.randomSubMonsterNum, skillManager.subMonMakeAmount);
                break;
            }
        }
    }