Esempio n. 1
0
        public void SetMap(int mapId)
        {
            if (MapsManager.GetMap(mapId, out MapData map))
            {
                if (this.map != null)
                {
                    GameObject.Destroy(this.map);
                }

                this.map       = GameObject.Instantiate <Map>(-9999, map.sizeX / 2, map.sizeY, map.sizeX, map.sizeY, map.resource);
                this.map.order = 0;
            }
        }
Esempio n. 2
0
        public void Init()
        {
            Instance = this;
            WebSocketController websocket = new WebSocketController();

            websocket.Initialize();

            MapsManager m = new MapsManager();

            playerController = new PlayerController();

            SetMap(0);

            App.OnUpdate += Update;
            App.OnClick  += App_OnClick;
        }