コード例 #1
0
 public MaterialProperties(MySoundPair soundCue, string particleEffectName, ContactPropertyParticleProperties effectProperties)
 {
     Sound = soundCue;
     ParticleEffectProperties = effectProperties;
     if (particleEffectName != null)
     {
         MyParticlesLibrary.GetParticleEffectsID(
             particleEffectName, out ParticleEffectID);
     }
     else
     {
         ParticleEffectID = -1;
     }
 }
コード例 #2
0
        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));
        }
コード例 #3
0
            public CollisionProperty(string soundCue, string particleEffectName, ContactPropertyParticleProperties effectProperties)
            {
                Sound = new MySoundPair(soundCue);
                ParticleEffect = particleEffectName;
	            ParticleEffectProperties = effectProperties;
            }
コード例 #4
0
 public CollisionProperty(string soundCue, string particleEffectName, ContactPropertyParticleProperties effectProperties)
 {
     Sound                    = new MySoundPair(soundCue);
     ParticleEffect           = particleEffectName;
     ParticleEffectProperties = effectProperties;
 }