Exemple #1
0
    public void Pickup()
    {
        Level.Get(gameObject).Pickup(this);
        Vector2 ppos = Level.Get(gameObject).player.transform.position;

        for (int i = 0; i < 13; i++)
        {
            GameObject go = S_Particle.CreateParticle((int)ppos.x, (int)ppos.y, i < 8?Colours.LIGHT:Colours.GREEN);
            go.transform.SetParent(Level.Get(gameObject).slider.transform);
        }
    }
Exemple #2
0
    public static GameObject CreateParticle(int x, int y, Color col)
    {
        GameObject go = GetPooledParticle();

        go.GetComponent <SpriteRenderer>().color = col;
        Util.SetLayer(go, Util.LayerName.Particles, 0);
        S_Particle particle = go.GetComponent <S_Particle>();

        particle.Setup(x, y);
        return(go);
    }