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; }
public Material GetGridColourForType(CubeColours colour) { return gridColours[(int)colour]; }