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

        FreezeMissile output = Instantiate(PrefabMissile, position, Quaternion.Euler(0, 0, angle)) as FreezeMissile;

        output.speed          = speed;
        output.angle          = angle;
        output.lifeTime       = lifeSpan;
        output.freezeDuration = freezeDuration;
        return(output);
    }
예제 #3
0
 protected override void ExecuteSpecialY()
 {
     AudioManager.PlayClipByName("Shot2");
     FreezeMissile.Spawn(transform.position + MathLib.FromPolar(Player.Radius + ReverseBubbleSpawner.Radius, Player.TurretAngle).ToVector3(),
                         Player.TurretAngle, Player.shotSpeed, projectileLifeSpan, projectileDuration);
 }