コード例 #1
0
ファイル: GridInstantiator.cs プロジェクト: rbrt/TurboPop
    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
ファイル: GridInstantiator.cs プロジェクト: rbrt/TurboPop
 public Material GetGridColourForType(CubeColours colour)
 {
     return gridColours[(int)colour];
 }