Example #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));
            }
        }
    }
Example #2
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);
     }
 }