コード例 #1
0
 private IEnumerator PopAtPeak(TimeBubbleSpawner spawner)
 {
     while (spawner.Age < 1)
     {
         yield return(null);
     }
     spawner.Detonate();
 }
コード例 #2
0
    protected override void ExecuteSpecialB()
    {
        TimeBubbleLimits tbl = ClonePlayerTBL();

        tbl.minTimeScaleMultiplier *= timeScaleMultiplier;
        tbl.maxTimeScaleMultiplier *= timeScaleMultiplier;
        StartCoroutine(PopAtPeak(TimeBubbleSpawner.Spawn(transform.position + MathLib.FromPolar(Player.Radius + TimeBubbleSpawner.Radius, Player.TurretAngle).ToVector3(), isSlowBubble, Player.TurretAngle, Player.shotSpeed, 2, tbl)));
    }
コード例 #3
0
 public static new void CheckLoadPrefab()
 {
     if (prefabBubble == null)
     {
         prefabBubble = Resources.Load <TimeBubble>("TimeBubble");
     }
     if (prefabSpawner == null)
     {
         prefabSpawner = Resources.Load <TimeBubbleSpawner>("TimeBubbleSpawner");
     }
 }
コード例 #4
0
    public static TimeBubbleSpawner Spawn(Vector3 position, bool isSlowBubble, float angle, float speed, float lifeTime, TimeBubbleLimits limits)
    {
        CheckLoadPrefab();

        TimeBubbleSpawner output = Instantiate(prefabSpawner, position, Quaternion.Euler(0, 0, angle)) as TimeBubbleSpawner;

        output.speed        = speed;
        output.angle        = angle;
        output.isSlowBubble = isSlowBubble;
        output.lifeTime     = lifeTime;
        output.limits       = limits;
        return(output);
    }
コード例 #5
0
 protected TimeBubbleSpawner ShootSlowBubble()
 {
     AudioManager.PlayClipByName("Shot1");
     return(TimeBubbleSpawner.Spawn(transform.position + MathLib.FromPolar(Radius + TimeBubbleSpawner.Radius, TurretAngle).ToVector3(), true, TurretAngle, shotSpeed, 5, timeBubbleLimits));
 }