Esempio n. 1
0
    private static ExplosionsPack getPack()
    {
        foreach (ExplosionsPack ep in explosionsPacks)
        {
            if (!ep.onScene)
            {
                return(ep);
            }
        }
        ExplosionsPack pack = Instantiate <Transform>(explosionsPack).GetComponent <ExplosionsPack>();

        pack.transform.parent = trans;
        pack.init();
        explosionsPacks.Add(pack);
        return(pack);
    }
Esempio n. 2
0
 public Explosion init(ExplosionsPack pack)
 {
     this.pack = pack;
     anim      = GetComponent <Animator>();
     return(this);
 }
Esempio n. 3
0
    public static void playExplosion(Ship ship)
    {
        ExplosionsPack pack = getPack();

        pack.play(ship);
    }