Esempio n. 1
0
    public IEnumerator OnTriggerEnter(Collider who)
    {
        if (who.tag != "Player")
        {
            yield break;
        }

        WorldMapControl controls = who.GetComponent <WorldMapControl>();

        if (controls != null)
        {
            controls.enabled = false;
        }

        PlayerControl sideControls = who.GetComponent <PlayerControl>();

        if (sideControls != null)
        {
            sideControls.enabled = false;
        }

        TransitionManager.Instance.PrepareTransition(spawnLocation, spawnRotation, sceneName);

        _fader.FadeOut();
        do
        {
            yield return(1);
        } while (!_fader.ScreenHidden);

        TransitionManager.Instance.ChangeScenes();
    }
    static int Initialize(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        WorldMapControl obj = LuaScriptMgr.GetNetObject <WorldMapControl>(L, 1);

        obj.Initialize();
        return(0);
    }
    static int set_CameraOffset(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        if (o == null)
        {
            LuaDLL.luaL_error(L, "unknown member name CameraOffset");
        }

        WorldMapControl obj = (WorldMapControl)o;

        obj.CameraOffset = LuaScriptMgr.GetNetObject <Vector3>(L, 3);
        return(0);
    }
    static int get_CameraOffset(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        if (o == null)
        {
            LuaDLL.luaL_error(L, "unknown member name CameraOffset");
        }

        WorldMapControl obj = (WorldMapControl)o;

        LuaScriptMgr.PushValue(L, obj.CameraOffset);
        return(1);
    }
    static int Create(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            WorldMapControl obj = new WorldMapControl();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: WorldMapControl.New");
        }

        return(0);
    }