static int _s_set_carvingTimeToStationary(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AI.NavMeshObstacle gen_to_be_invoked = (UnityEngine.AI.NavMeshObstacle)translator.FastGetCSObj(L, 1); gen_to_be_invoked.carvingTimeToStationary = (float)LuaAPI.lua_tonumber(L, 2); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int _g_get_radius(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AI.NavMeshObstacle gen_to_be_invoked = (UnityEngine.AI.NavMeshObstacle)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.radius); } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(1); }
static int _s_set_size(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { UnityEngine.AI.NavMeshObstacle __cl_gen_to_be_invoked = (UnityEngine.AI.NavMeshObstacle)translator.FastGetCSObj(L, 1); UnityEngine.Vector3 __cl_gen_value; translator.Get(L, 2, out __cl_gen_value); __cl_gen_to_be_invoked.size = __cl_gen_value; } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(0); }
static int _s_set_center(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); UnityEngine.AI.NavMeshObstacle gen_to_be_invoked = (UnityEngine.AI.NavMeshObstacle)translator.FastGetCSObj(L, 1); UnityEngine.Vector3 gen_value; translator.Get(L, 2, out gen_value); gen_to_be_invoked.center = gen_value; } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(0); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { UnityEngine.AI.NavMeshObstacle gen_ret = new UnityEngine.AI.NavMeshObstacle(); translator.Push(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.AI.NavMeshObstacle constructor!")); }
/// <summary> /// Write the specified value using the writer. /// </summary> /// <param name="value">Value.</param> /// <param name="writer">Writer.</param> public override void Write(object value, ISaveGameWriter writer) { UnityEngine.AI.NavMeshObstacle navMeshObstacle = (UnityEngine.AI.NavMeshObstacle)value; writer.WriteProperty("height", navMeshObstacle.height); writer.WriteProperty("radius", navMeshObstacle.radius); writer.WriteProperty("velocity", navMeshObstacle.velocity); writer.WriteProperty("carving", navMeshObstacle.carving); writer.WriteProperty("carveOnlyStationary", navMeshObstacle.carveOnlyStationary); writer.WriteProperty("carvingMoveThreshold", navMeshObstacle.carvingMoveThreshold); writer.WriteProperty("carvingTimeToStationary", navMeshObstacle.carvingTimeToStationary); writer.WriteProperty("shape", navMeshObstacle.shape); writer.WriteProperty("center", navMeshObstacle.center); writer.WriteProperty("size", navMeshObstacle.size); writer.WriteProperty("enabled", navMeshObstacle.enabled); writer.WriteProperty("tag", navMeshObstacle.tag); writer.WriteProperty("name", navMeshObstacle.name); writer.WriteProperty("hideFlags", navMeshObstacle.hideFlags); }
public override void ReadFrom(object obj) { base.ReadFrom(obj); if (obj == null) { return; } UnityEngine.AI.NavMeshObstacle o = (UnityEngine.AI.NavMeshObstacle)obj; height = o.height; radius = o.radius; velocity = o.velocity; carving = o.carving; carveOnlyStationary = o.carveOnlyStationary; carvingMoveThreshold = o.carvingMoveThreshold; carvingTimeToStationary = o.carvingTimeToStationary; shape = (uint)o.shape; center = o.center; size = o.size; }
public override object WriteTo(object obj, System.Collections.Generic.Dictionary <long, UnityEngine.Object> objects) { obj = base.WriteTo(obj, objects); if (obj == null) { return(null); } UnityEngine.AI.NavMeshObstacle o = (UnityEngine.AI.NavMeshObstacle)obj; o.height = height; o.radius = radius; o.velocity = velocity; o.carving = carving; o.carveOnlyStationary = carveOnlyStationary; o.carvingMoveThreshold = carvingMoveThreshold; o.carvingTimeToStationary = carvingTimeToStationary; o.shape = (UnityEngine.AI.NavMeshObstacleShape)shape; o.center = center; o.size = size; return(o); }
/// <summary> /// Read the data into the specified value. /// </summary> /// <param name="value">Value.</param> /// <param name="reader">Reader.</param> public override void ReadInto(object value, ISaveGameReader reader) { UnityEngine.AI.NavMeshObstacle navMeshObstacle = (UnityEngine.AI.NavMeshObstacle)value; foreach (string property in reader.Properties) { switch (property) { case "height": navMeshObstacle.height = reader.ReadProperty <System.Single> (); break; case "radius": navMeshObstacle.radius = reader.ReadProperty <System.Single> (); break; case "velocity": navMeshObstacle.velocity = reader.ReadProperty <UnityEngine.Vector3> (); break; case "carving": navMeshObstacle.carving = reader.ReadProperty <System.Boolean> (); break; case "carveOnlyStationary": navMeshObstacle.carveOnlyStationary = reader.ReadProperty <System.Boolean> (); break; case "carvingMoveThreshold": navMeshObstacle.carvingMoveThreshold = reader.ReadProperty <System.Single> (); break; case "carvingTimeToStationary": navMeshObstacle.carvingTimeToStationary = reader.ReadProperty <System.Single> (); break; case "shape": navMeshObstacle.shape = reader.ReadProperty <UnityEngine.AI.NavMeshObstacleShape> (); break; case "center": navMeshObstacle.center = reader.ReadProperty <UnityEngine.Vector3> (); break; case "size": navMeshObstacle.size = reader.ReadProperty <UnityEngine.Vector3> (); break; case "enabled": navMeshObstacle.enabled = reader.ReadProperty <System.Boolean> (); break; case "tag": navMeshObstacle.tag = reader.ReadProperty <System.String> (); break; case "name": navMeshObstacle.name = reader.ReadProperty <System.String> (); break; case "hideFlags": navMeshObstacle.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> (); break; } } }
/// <summary> /// Read the data using the reader. /// </summary> /// <param name="reader">Reader.</param> public override object Read(ISaveGameReader reader) { UnityEngine.AI.NavMeshObstacle navMeshObstacle = SaveGameType.CreateComponent <UnityEngine.AI.NavMeshObstacle> (); ReadInto(navMeshObstacle, reader); return(navMeshObstacle); }