public void Release() { if (m_model != null) { m_model.Release(); } }
public static Vehicle CreateVehicle(Model model, Vector3 position) { model.Load(); var car = Internal.Function.Call<Vehicle>(0x00a5, model, position); model.Release(); return car; }
public static Pickup CreatePickup(Vector3 position, Model model, PickupType type) { model.Load(); var retval = Internal.Function.Call<Pickup>(0x0213, model, (int)type, position); PickupHandler.Register(retval); model.Release(); retval._origPos = position; return retval; }
public static Ped CreatePed(Model model, Vector3 position, int pedtype) { if (model.ID >= 290 && model.ID <= 299) { return Internal.Function.Call<Ped>(0x009a, pedtype, model, position); } model.Load(); var ped = Internal.Function.Call<Ped>(0x009a, pedtype, model, position); model.Release(); return ped; }
private void loadFile(string filePath) { scene = new Scene(); if (filePath.EndsWith("scene")) { scene.Load(resourceContext, filePath); } else if (filePath.EndsWith("hlsl")) { Shader shader = new Shader(); shader.Load(resourceContext, filePath); Material material = new Material { Shader = shader, Valid = true }; shader.Release(); Model model = Models.MakeCube(resourceContext, material); model.Scale = new Float3(50, 50, 50); material.Release(); scene.Entities.Add(model); model.Release(); } sceneView.Scene = scene; }
public void ReleaseTest() { _model.Release(INIT_POSITION_X, INIT_POSITION_Y); }