Esempio n. 1
0
        public LoadIngamePlayerOrObserverUILogic(Widget widget, World world)
        {
            var ingameRoot = widget.Get("INGAME_ROOT");
            var worldRoot  = widget.Get("WORLD_ROOT");

            var playerRoot = worldRoot.Get("PLAYER_ROOT");
            //if(world.LocalPlayer != null){

            //    WarGame.LoadWidget(world, "OBSERVER_WIDGETS", playerRoot, new WidgetArgs());
            //}
            //else{

            var playerWidgets = WarGame.LoadWidget(world, "PLAYER_WIDGETS", playerRoot, new WidgetArgs());
            var sidebarTicker = playerWidgets.Get <LogicTickerWidget>("SIDEBAR_TICKER");


            //}

            world.GameOver += () =>
            {
                UI.CloseWindow();

                if (world.LocalPlayer != null)
                {
                    var scriptContext = world.WorldActor.TraitOrDefault <LuaScript>();
                    //var missionData = world.WorldActor.Info.TraitInfoOrDefault<>()
                }
            };
        }
Esempio n. 2
0
        void IWorldLoaded.WorldLoaded(World w, WorldRenderer render)
        {
            if (info.ClearRoot)
            {
                UI.ResetAll();
            }


            //WarGame.LoadWidget(w,info.IngameRoot,UI.Root,new WidgetArgs());

            var widget = w.Type == WorldT.Shellmap ? info.ShellmapRoot : w.Type == WorldT.Editor ? info.EditorRoot : info.IngameRoot;

            WarGame.LoadWidget(w, widget, UI.Root, new WidgetArgs());
        }