Example #1
0
 /// <summary>
 /// 使用前初始化
 /// </summary>
 /// <param name="danmuGo"></param>
 /// <returns></returns>
 public Boom init(Vector2 danmuGo)
 {
     danmuShoots      = gameObject.AddComponent <BarrageLauncher>();
     rigid2d          = GetComponent <Rigidbody2D>();
     speed            = danmuGo;
     rigid2d.velocity = danmuGo;
     return(this);
 }
Example #2
0
    void DoShot()
    {
        Vector2    shotPoint      = new Vector2(Random.Range(-300, 300), Random.Range(0, 500));
        Quaternion rotateToPlayer = BarrageBase.GetAimRotation(shotPoint, _playerTransform.position);

        BarrageLauncher.ShotRing(_bullet, shotPoint, rotateToPlayer, 18);
        //BarrageLauncher.ShotABullet(_bullet, shotPoint, rotateToPlayer);
        //BarrageLauncher.ShotFanShaped(_bullet, shotPoint, rotateToPlayer, 9, 60);
        //BarrageLauncher.ShotTransverselyLine(_bullet, shotPoint, rotateToPlayer, 17, 60);
        //BarrageLauncher.ShotPane(_bullet, shotPoint, rotateToPlayer, 7);
        //BarrageLauncher.ShotRingToCenter(_bullet, _playerTransform.position, Quaternion.identity, 8, 400);

        UpdateNextShot();
    }
Example #3
0
 //分裂
 void Fission()
 {
     BarrageLauncher.ShotRing(_bullet, transform.position, transform.rotation, _bulletsNumber);
 }
Example #4
0
 private void Reset()
 {
     playableDirector = GetComponent <PlayableDirector>();
     barrageLauncher  = GetComponent <BarrageLauncher>();
 }