Ejemplo n.º 1
0
 public static void add(PhysicMaterial physmat, SurfaceMaterialType mattype)
 {
     if (!matToSurfaceType.ContainsKey(physmat))
     {
         matToSurfaceType.Add(physmat, mattype);
     }
 }
Ejemplo n.º 2
0
 public GameObject GetImpactEffect(SurfaceMaterialType materialType)
 {
     foreach (var effect in ImpactEffects)
     {
         if (effect.MaterialType == materialType)
         {
             return(effect.EffectPrefab);
         }
     }
     return(DefaultImpactEffect);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Resets the surface properties of a material to the default values
 /// </summary>
 /// <param name="type"></param>
 public void ResetSurfaceProperty(SurfaceMaterialType type)
 {
     MtaClient.EngineResetSurfaceProperties((int)type);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// This method sets the value of a surface property
 /// </summary>
 /// <param name="type"></param>
 /// <param name="property"></param>
 /// <param name="value">A range of possible values. Checkout: https://wiki.multitheftauto.com/wiki/EngineSetSurfaceProperties</param>
 public void SetSurfaceProperty(SurfaceMaterialType type, SurfaceMaterialProperty property, dynamic value)
 {
     MtaClient.EngineSetSurfaceProperties((int)type, property.ToString().ToLower(), value);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// This method retrieves the value of a surface property.
 /// </summary>
 /// <param name="type"></param>
 /// <param name="property"></param>
 /// <returns>A dynamic range of values, for a full list checkout: https://wiki.multitheftauto.com/wiki/EngineGetSurfaceProperties </returns>
 public dynamic GetSurfaceProperty(SurfaceMaterialType type, SurfaceMaterialProperty property)
 {
     return(MtaClient.EngineGetSurfaceProperties((int)type, property.ToString().ToLower()));
 }