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

        PolarityReverser output = Instantiate(PrefabReverser, position, Quaternion.Euler(0, 0, angle)) as PolarityReverser;

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