public MaterialProperties(MySoundPair soundCue, string particleEffectName, ContactPropertyParticleProperties effectProperties) { Sound = soundCue; ParticleEffectProperties = effectProperties; if (particleEffectName != null) { MyParticlesLibrary.GetParticleEffectsID( particleEffectName, out ParticleEffectID); } else { ParticleEffectID = -1; } }
public MyTuple <int, ContactPropertyParticleProperties> GetCollisionEffectAndProperties(MyStringId type, MyStringHash materialType1, MyStringHash materialType2) { int foundId = -1; ContactPropertyParticleProperties foundProperties = null; Dictionary <MyStringHash, Dictionary <MyStringHash, MaterialProperties> > typeDic; if (MaterialCues.TryGetValue(type, out typeDic)) { Dictionary <MyStringHash, MaterialProperties> materialDic; if (typeDic.TryGetValue(materialType1, out materialDic)) { MaterialProperties result; if (materialDic.TryGetValue(materialType2, out result)) { foundId = result.ParticleEffectID; foundProperties = result.ParticleEffectProperties; } } } return(MyTuple.Create(foundId, foundProperties)); }
public CollisionProperty(string soundCue, string particleEffectName, ContactPropertyParticleProperties effectProperties) { Sound = new MySoundPair(soundCue); ParticleEffect = particleEffectName; ParticleEffectProperties = effectProperties; }