public static new void CheckLoadPrefab()
 {
     if (PrefabDestroyer == null)
     {
         PrefabDestroyer = Resources.Load <BubbleDestroyer>("BubbleDestroyer");
     }
 }
    public static BubbleDestroyer Spawn(Vector3 position, float angle, float speed)
    {
        CheckLoadPrefab();

        BubbleDestroyer output = Instantiate(PrefabDestroyer, position, Quaternion.Euler(0, 0, angle)) as BubbleDestroyer;

        output.speed    = speed;
        output.angle    = angle;
        output.lifeTime = 3;
        return(output);
    }
Exemplo n.º 3
0
 protected override void ExecuteSpecialY()
 {
     AudioManager.PlayClipByName("Shot2");
     BubbleDestroyer.Spawn(transform.position + MathLib.FromPolar(Player.Radius + BubbleDestroyer.Radius, Player.TurretAngle).ToVector3(),
                           Player.TurretAngle, Player.shotSpeed);
 }