Example #1
0
    public void AttackCalculate()
    {
        int attackPower = 15;

        Debug.Log("AttackCalculate to rcvChaseTarget value :" + rcvChaseTarget);
        if (rcvChaseTarget.Equals(""))
        {
            Debug.Log("rcvChaseTarget null PointException");
            return;
        }

        if (rcvChaseTarget.Equals("remotePlayer"))
        {
            playerParams.SetEnemyAttack(attackPower);
            print("Attack" + player.name);
        }
        else if (rcvChaseTarget.Equals("Spider"))
        {
            curEnemyParams.SetEnemyAttack(attackPower);
            print("Attack" + monster.name);
        }
        else if (rcvChaseTarget.Equals("redTower"))
        {
            towerParams.SetEnemyAttack(attackPower);
            print("Attack" + towerParams.name);
        }
    }
Example #2
0
    public void AttackCalculate()
    {
        if (m_CurEnemy == null)
        {
            return;
        }
        //Debug.Log("Attack" + m_CurEnemy.name);
        //m_CurEnemy.GetComponent<MonsterState>().ShowEffect();

        int attackPower = myParams.GetRandomAttack();

        curEnemyParams.SetEnemyAttack(attackPower);
        // int attackPower = myParams.GetRandomAttack();


        //Collider[] hitColliders = Physics.OverlapSphere(transform.position, attackDistance, 1 << 10);
        //int num = hitColliders.Length;
        //for (int i = 0; i < num; i++)
        //{
        //    Debug.Log(hitColliders[i].name + i + "감지됨");


        //    Vector3 direction = hitColliders[i].transform.position - transform.position;
        //    if (Vector3.Angle(direction, transform.forward) < 45f)
        //    {

        //        hitColliders[i].GetComponent<Creature>().SetEnemyAttack(attackPower);
        //    }

        //}
    }
Example #3
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         int attackPower = myParams.GetRandomAttack();
         enemyParams.SetEnemyAttack(attackPower);
     }
 }
Example #4
0
    //  데미지 이벤트
    public void AttackCalculate()
    {
        int attackPower = 15;

        if (skillButton == null)
        {
            skillButton = GameObject.Find("TaiLungSpell1").GetComponent <SkillButton>();
        }

        if (skillButton.skill1Start == true)
        {
            remoteParams.SetEnemyAttack(attackPower);

            print("플레이어 타이렁 캐릭터 스킬 1 발동");
        }

        //if (curEnemy == null)
        //    return;
        Debug.Log("AttackCalculate to chaseTarget:" + chaseTarget);
        if (chaseTarget.Equals(""))
        {
            return;
        }

        if (chaseTarget.Equals("remotePlayer"))
        {
            remoteParams.SetEnemyAttack(attackPower);
            print("Attack" + remoteParams.name);
        }
        else if (chaseTarget.Equals("monster"))
        {
            curEnemyParams.SetEnemyAttack(attackPower);
            print("Attack" + monster.name);
        }
        else if (chaseTarget.Equals("redTower"))
        {
            towerParams.SetEnemyAttack(attackPower);
            print("Attack" + towerParams.name);
        }
    }
Example #5
0
    public void AttackCal()                           //공격 이벤트 함수.
    {
        int attackPower = myParams.GetRandomAttack(); //공격력 계산.

        monParams.SetEnemyAttack(attackPower);        //공격력을 몬스터 전달.
    }