Пример #1
0
    public override void OnStart()
    {
        aniScript         = GetComponent <CloseAttackTypeNormalAni>();
        hpPostionScript   = GetComponent <EnemyHpPostionScript>();
        colliderConScript = GetComponent <CloseAttackTypeNormalColliderCon>();

        closeAttackTypeNormalColliderCon = GetComponent <CloseAttackTypeNormalColliderCon>();
    }
 public override void OnStart()
 {
     if (Vector3.Distance(transform.position, target.Value.position) > isFarOrCloseDistance)
     {
         numOfPattern.Value = 2;
     }
     startTime         = Time.time;
     aniScript         = GetComponent <CloseAttackTypeNormalAni>();
     hpPostionScript   = GetComponent <EnemyHpPostionScript>();
     colliderConScript = GetComponent <CloseAttackTypeNormalColliderCon>();
 }
Пример #3
0
    public override void OnStart()
    {
        switch (thisGameObjName.Value)
        {
        case "CloseAttackEnemy01":
            closeAttackTypeNormalColliderCon = GetComponent <CloseAttackTypeNormalColliderCon>();
            break;

        case "DistanceAttackEnemy01":
            break;

        case "Boss_01(Clone)":
            break;
        }
    }
Пример #4
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.name == "CloseAttackEnemy01")
        {
            CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>();

            isSucess = con.isStun;
            return;
        }

        // 튜토리얼용
        if ((other.gameObject.name == "TutorialEnemy01(Clone)") &&
            (SceneManager.GetActiveScene().name == "Tutorial_Scene_Ver2") &&
            (forTutorialMonsterCheckOnce == false))
        {
            TutorialManagerVer2 tutorialManagerScript = GameObject.Find("TutorialManagerVer2").GetComponent <TutorialManagerVer2>();

            if (tutorialManagerScript.tutorial != TutorialStateVer2.step03_6)
            {
                return;
            }

            CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>();
            isSucess = con.isStun;
            switch (isSucess)
            {
            case true:
                tutorialManagerScript.tutorial = TutorialStateVer2.step03_7;

                TutorialTypeMonsterMove tutorialMonsterMoveScript = other.GetComponent <TutorialTypeMonsterMove>();
                tutorialMonsterMoveScript.state = TutorialEnemyState.getWait;

                forTutorialMonsterCheckOnce = true;
                break;
            }
            return;
        }

        // 튜토리얼 + 일반 전투용
        if ((other.gameObject.name == "TutorialEnemy01(Clone)") &&
            (SceneManager.GetActiveScene().name == "Tutorial_Scene_Ver2"))
        {
            CloseAttackTypeNormalColliderCon con = other.GetComponent <CloseAttackTypeNormalColliderCon>();
            isSucess = con.isStun;

            return;
        }
    }
    public override void OnStart()
    {
        velo = Vector3.zero;

        startTime  = Time.time;
        randomTime = Random.Range(minRandomTime, maxRandomTime);

        switch (thisGameObjName.Value)
        {
        case "CloseAttackEnemy01":
            hpPostionScript = GetComponent <EnemyHpPostionScript>();
            closeAttackTypeNormalColliderCon = GetComponent <CloseAttackTypeNormalColliderCon>();
            closeAttackEnemyaniScript        = GetComponent <CloseAttackTypeNormalAni>();
            closeAttackEnemyaniScript.aniSet("Reset_Ani");
            break;

        case "DistanceAttackEnemy01":
            distanceAttackEnemyaniScript = GetComponent <DistanceAttackTypeNormalAni>();
            distanceAttackEnemyaniScript.aniSet("Reset_Ani");
            break;

        case "Boss_01(Clone)":
            boss01ColliderCon       = GetComponent <Boss01ColliderCon>();
            bossAniScript01         = GetComponent <BossAniScript>();
            weaponColliderConScript = GetComponent <WeaponColliderCon>();

            weaponColliderConScript.weaponColliderOff();

            for (int i = 1; i < 10; i++)
            {
                float num = 0;
                switch (i)
                {
                case 1:
                    num = 8f;
                    break;

                case 2:
                    num = 3f;
                    break;

                case 3:
                    num = 2f;
                    break;

                case 4:
                    num = 2f;
                    break;

                case 5:
                    num = 2f;
                    break;

                case 6:
                    num = 2f;
                    break;

                case 7:
                    num = 1.5f;
                    break;

                case 8:
                    num = 1.6f;
                    break;

                case 9:
                    num = 2f;
                    break;
                }

                bossAttackDistancePattern[i] = num;
            }
            break;
        }
    }