Esempio n. 1
0
    static int GetAreaCost(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        NavMeshAgent obj  = LuaScriptMgr.GetUnityObject <NavMeshAgent>(L, 1);
        int          arg0 = (int)LuaScriptMgr.GetNumber(L, 2);
        float        o    = obj.GetAreaCost(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
        void DoGetLayerCost()
        {
            if (_agent == null)
            {
                return;
            }

            int areaId = area.Value;

            if (orAreaName.Value != "")
            {
                areaId = NavMesh.GetAreaFromName(orAreaName.Value);
            }

            storeResult.Value = _agent.GetAreaCost(areaId);
        }