예제 #1
0
    public ParticleSystem GetParticlesForExplosion(Transform target, CubeColours colour)
    {
        var ps = GameObject.Instantiate(explosionParticleSystem, target.position, target.rotation) as ParticleSystem;

        if (ps.GetComponent<Renderer>() == null){
            return null;
        }

        ps.GetComponent<Renderer>().material = particleColours[(int)colour];

        return ps;
    }
예제 #2
0
 public Material GetGridColourForType(CubeColours colour)
 {
     return gridColours[(int)colour];
 }