Exemple #1
0
    protected void ActionMode1()
    {
        moveToPlayer();
        launch.coolTime = 3f;

        if (IsFindPlayer)
        {
            if (launch.CoolEnd() && !isClose)
            {
                launch.AroundShootAttack(Var.ItemType.FireBallItem, Random.Range(0, 30), 30);
                StartCoroutine(WaitSeconds(1.5f));
            }
        }
    }
Exemple #2
0
 protected void Attack()
 {
     if (monsterLaunch.CoolEnd() && !isClose)
     {
         monsterLaunch.ShootItem(shootItem);
     }
 }
Exemple #3
0
    protected void ActionMode1()
    {
        moveToPlayer();
        launch.coolTime = 4f;
        // Tools.LookAtOnlyYAxis(transform, GameManager.player.transform);
        if (IsFindPlayer)
        {
            if (launch.CoolEnd() && !isClose)
            {
                int a = Random.Range(-8, 20);
                if (a < 0)
                {
                    launch.ShootItemAtPos(Var.ItemType.FireBallItem, launch.transform.position + transform.forward + new Vector3(0, 0.5f, 0));
                    launch.ShootItemAtPos(Var.ItemType.FireBallItem, launch.transform.position + (transform.forward * 2 + transform.right).normalized + new Vector3(0, 0.5f, 0));
                    launch.ShootItemAtPos(Var.ItemType.FireBallItem, launch.transform.position + (transform.forward * 2 - transform.right).normalized + new Vector3(0, 0.5f, 0));
                }
                else if (a < 10)
                {
                    launch.ShootItemAtPos(Var.ItemType.FireBallItem, launch.transform.position + dirFromPlayer.normalized + new Vector3(0, 0.5f, 0));
                    StartCoroutine(launch.ShootItemAtPosWait(Var.ItemType.FireBallItem, launch.transform.position + dirFromPlayer.normalized + new Vector3(0, 0.5f, 0), 0.1f, 500, -1));
                    StartCoroutine(launch.ShootItemAtPosWait(Var.ItemType.FireBallItem, launch.transform.position + dirFromPlayer.normalized + new Vector3(0, 0.5f, 0), 0.2f, 500, -1));
                    StartCoroutine(launch.ShootItemAtPosWait(Var.ItemType.FireBallItem, launch.transform.position + dirFromPlayer.normalized + new Vector3(0, 0.5f, 0), 0.3f, 500, -1));
                }
                else if (a <= 18)
                {
                    Vector3 pos = launch.transform.position + new Vector3(0, 0.5f, 0) + transform.forward;
                    launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos, 500, transform.forward);
                    launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos + transform.right * 1, 500, transform.forward);
                    launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos + transform.right * 2, 500, transform.forward);
                    //  launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos + transform.right * 3, 500, transform.forward);
                    //  launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos + transform.right * 4, 500, transform.forward);
                    launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos - transform.right * 1, 500, transform.forward);
                    launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos - transform.right * 2, 500, transform.forward);
                    //  launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos - transform.right * 3, 500, transform.forward);
                    //  launch.ShootItemAtPosWithDir(Var.ItemType.FireBallItem, pos - transform.right * 4, 500, transform.forward);
                }



                StartCoroutine(WaitSeconds(1.5f));
            }
        }
    }
Exemple #4
0
 protected void ActionMode1()
 {
     moveAroundPlayer();
     launch.coolTime = 4f;
     // Tools.LookAtOnlyYAxis(transform, GameManager.player.transform);
     if (IsFindPlayer)
     {
         if (launch.CoolEnd() && !isClose)
         {
             int a = Random.Range(-15, 20);
             if (a < 0)
             {
                 Vector3 pos = launch.transform.position + new Vector3(0, 0.5f, 0) + transform.forward;
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForceTwice(Var.ItemType.IceBallItem, pos + transform.right, 400, 0.2f, 0.5f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForceTwice(Var.ItemType.IceBallItem, pos - transform.right, 400, 0.6f, 0.5f));
             }
             else if (a < 10)
             {
                 Vector3 pos = launch.transform.position + new Vector3(0, 0.5f, 0) + transform.forward;
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForce(Var.ItemType.IceBallItem, pos, 500, 1.2f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForce(Var.ItemType.IceBallItem, pos + transform.right * 2, 400, 2.0f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForce(Var.ItemType.IceBallItem, pos + transform.right * 4, 400, 1.6f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForce(Var.ItemType.IceBallItem, pos - transform.right * 2, 400, 0.8f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForce(Var.ItemType.IceBallItem, pos - transform.right * 4, 400, 0.4f));
             }
             else if (a < 18)
             {
                 Vector3 pos = launch.transform.position + new Vector3(0, 0.5f, 0) + transform.forward;
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForceDirAndPlayerTwice(Var.ItemType.IceBallItem, pos + transform.right * 2, 400, transform.forward, 0, 0.5f));
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForceDirAndPlayerTwice(Var.ItemType.IceBallItem, pos - transform.right * 2, 400, transform.forward, 0.5f, 0.5f));
             }
             else
             {
                 Vector3 pos = launch.transform.position + new Vector3(0, 0.5f, 0) + transform.forward;
                 StartCoroutine(launch.ShootAttackAtPosWaitAddForceTriple(Var.ItemType.PoisonItem, pos + transform.right, 400, 0.2f, 0.5f, 0.5f));
             }
             leftOrRight = -leftOrRight;
             StartCoroutine(WaitSeconds(2f));
         }
     }
 }
Exemple #5
0
 protected void ActionMode1()
 {
     if (isDash == -1)
     {
         moveAroundPlayer();
         launch.coolTime = 5f;
         if (launch.CoolEnd() && !isClose)
         {
             int a = Random.Range(-1, 15);
             if (a < 0)
             {
                 launch.AroundShootAttack(Var.ItemType.BoomItem, Random.Range(0, 30), 60, 100, -1);
             }
             else if (a > 10)
             {
                 launch.ShootItemAtPos(Var.ItemType.BoomItem, transform.forward, 200);
                 launch.ShootItemAtPos(Var.ItemType.BoomItem, 2 * transform.forward + transform.right, 200);
                 launch.ShootItemAtPos(Var.ItemType.BoomItem, 2 * transform.forward - transform.right, 200);
             }
             else
             {
                 launch.AroundShootAttack(Var.ItemType.BulletItem, Random.Range(0, 10), 20);
             }
         }
         if (Random.Range(-1, 300) < 0)
         {
             StartCoroutine(Dash());
         }
     }
     else if (isDash == 0)
     {
         Tools.LookAtOnlyYAxis(transform, GameManager.player.transform);
     }
     if (isDash == 1 && setTime == _setTime && !isHitSth)
     {
         launch.AroundShootAttack(Var.ItemType.BoomItem, 30, 60, 50, -1);
     }
 }