private void ClientRemote_ChunksDiscovered(List <Vector2Ushort> discoveredChunks) { //Logger.WriteDev("Client received from server the new discovered tiles for current character: " // + discoveredChunks.GetJoinedString(Environment.NewLine)); Client.World.AddDiscoveredWorldChunks( WorldMapController.OrderChunksByProximityToPlayer(discoveredChunks)); }
public void Init(WorldMapController worldMapCtrl) { //Hide GetComponent<Image>().enabled = false; hoverSpriteRenderer.enabled = false; this.worldMapCtrl = worldMapCtrl; }
public ClientWorldMapTradingTerminalsVisualizer(WorldMapController worldMapController) { this.worldMapController = worldMapController; this.marksProvider = TradingStationsMapMarksSystem.ClientTradingStationMarksList; this.marksProvider.CollectionChanged += this.MarksProviderChangedHandler; this.Reset(); }
public Controller( ILogicObject areasGroup, WorldMapController worldMapController) { this.areasGroup = areasGroup; this.worldMapController = worldMapController; this.ReInitialize(); }
static void Prefix(WorldMapController __instance) { if (!Main.enabled) { return; } WorldMapController_AddAction_Patch.instance = __instance; }
public ClientWorldMapPartyMembersVisualizer(WorldMapController worldMapController) { this.worldMapController = worldMapController; PartyMembersVisualizationSystem.ClientUpdateReceived += this.PartyMembersVisualizationSystemClientUpdateReceivedHandler; PartySystem.ClientCurrentPartyMemberAddedOrRemoved += this.PartySystemCurrentPartyMemberAddedOrRemovedHandler; }
private void Start() { animator = GetComponent <Animator>(); button = GetComponent <Button>(); mapController = GetComponentInParent <WorldMapController>(); if (!Service.Get <ZoneTransitionService>().IsInIgloo&& Service.Get <ZoneTransitionService>().CurrentZone == ZoneDefinition) { button.interactable = false; } }
public ClientWorldMapCustomMarkVisualizer(WorldMapController worldMapController) : base(worldMapController) { this.worldMapController = worldMapController; this.customMarkManager = CustomMarkManager.GetInstance(); this.customMarkManager.MarkListChanged += CustomMarkManager_MarkListChanged; this.customMarkManager.MarkAdded += CustomMarkManager_MarkAdded; this.customMarkManager.MarkRemoved += CustomMarkManager_MarkRemoved; }
void Start() { WorldMapController = gameObject.GetComponent <WorldMapController>(); Instructions = gameObject.GetComponent <Instructions>(); HandControllers = new List <HandController>(); if (GameObject.Find("BGM") != null) { Destroy(GameObject.Find("BGM")); } }
void StartAR() { if (GameManager.Instance != null) { Debug.Log("AR Start"); GameManager.Instance.EnableAR(); instText.text = "Please Look Around"; _wmc = GameManager.Instance.wmController; _wmc.CreateWorldMap(OnMapCreate); } }
void StartAR() { if (GameManager.Instance != null) { Debug.Log("AR Start"); GameManager.Instance.EnableAR(); instText.text = "Push Load Button"; _wmc = GameManager.Instance.wmController; _wmc.FoundWorldMap(OnMapFound); } }
public ClientWorldMapLandClaimVisualizer(WorldMapController worldMapController) { this.worldMapController = worldMapController; ClientLandClaimAreaManager.AreaAdded += this.AreaAddedHandler; ClientLandClaimAreaManager.AreaRemoved += this.AreaRemovedHandler; foreach (var area in ClientLandClaimAreaManager.EnumerateAreaObjects()) { this.AreaAddedHandler(area); } }
public IEnumerator getWindImages() { float worldMapSize = 4096 * _currZoom;//_windImagesParent.GetComponent<RectTransform>().sizeDelta.x; int amount = Mathf.RoundToInt(Mathf.Sqrt((worldMapSize / 2048))); int maxxy = (int)Mathf.Pow(2, amount); Vector2 playerpos = MainGameController.instance.player.getCurrentLocationLatLon(); Vector3 pos = WorldMapController.LatitudeLongitudeToTileId(playerpos.x, playerpos.y, amount); int minx = (int)((pos.x - 2 >= 0) ? pos.x - 2 : 0); int maxx = (int)((pos.x + 2 < maxxy) ? pos.x + 2 : maxxy - 1); int miny = (int)((pos.y - 2 >= 0) ? pos.y - 2 : 0); int maxy = (int)((pos.y + 2 < maxxy) ? pos.y + 2 : maxxy - 1); int lastIndex = 0; _windImagesParent.SetActive(false); _loadingImage.SetActive(true); _zoominButton.interactable = false; _zoomOutButton.interactable = false; //_loadedIndex = MainGameController.instance.networkController.GetCurrentWeatherImageIndex(); int startIndex = _loadedIndex; int index = startIndex; for (int fx = minx; fx <= maxx; fx++) { for (int fy = maxy; fy >= miny; fy--) { OWMWeatherImage oWMWeatherImage = _downloadedWeatherImages.Where(x => x.ZoomLevel == _currZoom && x.Position == new Vector2(fx, fy) && (x.DownloadTime - System.DateTime.Now).Hours < 1).FirstOrDefault(); if (oWMWeatherImage == null) { index = MainGameController.instance.networkController.getWindImage(amount, fx, fy); } else { index++; oWMWeatherImage.Index = index; } lastIndex = index; StartCoroutine(WaitForImageResponse(index, new Vector2(fx, fy))); yield return(new WaitForSeconds(0.1f)); } } StartCoroutine(viewWeatherMapWhenDone(startIndex, lastIndex)); //float parentpos = ((worldMapSize / 2048) - 1) * 1024; //_windImagesParent.transform.localPosition = new Vector3(parentpos, -parentpos); //MainGameController.instance.networkController.getWindImage(0, 0, 0); //StartCoroutine(WaitForImageResponse()); }
public void OnChooseRouteButtonClick() { if (_selectedRoute != null) { float distance = WorldMapController.calculateRouteDistanceKM(_selectedRoute); _selectedRoute.SetDistanceLeft(distance); TimeSpan timeSpan = _selectedRoute.GetTimeLeft(MainGameController.instance.player.GetActiveBoat().GetOfflineSpeed()); _routeSelectedConfirmPanel.SetData(_selectedRoute.GetFromLocation().Name, _selectedRoute.GetToLocation().Name, distance, timeSpan); _routeSelectedConfirmPanel.gameObject.SetActive(true); } }
public ClientWorldMapBedVisualizer(WorldMapController worldMapController) : base(worldMapController) { this.stateSubscriptionOwner = new StateSubscriptionStorage(); this.playerCharacterPrivateState = ClientCurrentCharacterHelper.PrivateState; this.playerCharacterPrivateState.ClientSubscribe( _ => _.CurrentBedObjectPosition, _ => this.Refresh(), this.stateSubscriptionOwner); this.Refresh(); }
public ClientWorldMapBedVisualizer(WorldMapController worldMapController) { this.stateSubscriptionOwner = new StateSubscriptionStorage(); this.worldMapController = worldMapController; this.playerCharacterPrivateState = Api.Client.Characters.CurrentPlayerCharacter .GetPrivateState <PlayerCharacterPrivateState>(); this.playerCharacterPrivateState.ClientSubscribe( _ => _.CurrentBedObjectPosition, _ => this.Refresh(), this.stateSubscriptionOwner); this.Refresh(); }
// Use this for initialization void Awake() { _instance = this; //load world map object _worldmap = new GameObject[worldMapPaths.Length]; for (int i = 0; i < worldMapPaths.Length; ++i) { GameObject prefab = InJoy.AssetBundles.AssetBundles.Load(worldMapPaths[i]) as GameObject; _worldmap[i] = GameObject.Instantiate(prefab) as GameObject; _worldmap[i].SetActive(false); } }
public ClientWorldMapDroppedItemsVisualizer(WorldMapController worldMapController) { this.worldMapController = worldMapController; var playerCharacter = Api.Client.Characters.CurrentPlayerCharacter; this.droppedItemsLocations = PlayerCharacter.GetPrivateState(playerCharacter) .DroppedItemsLocations; this.droppedItemsLocations.ClientElementInserted += this.MarkerAddedHandler; this.droppedItemsLocations.ClientElementRemoved += this.MarkerRemovedHandler; foreach (var position in this.droppedItemsLocations) { this.AddMarker(position); } }
internal WorldManager(EventManager p_eventManager) { CurrentSaveGameFolder = GamePaths.UserGamePath; QuickSaveAllowed = true; m_mapData = new Dictionary <String, MapData>(); m_objects = new List <BaseObject>(); m_invalidSpawner = new List <Int32>(); m_questHandler = new QuestHandler(); m_loreBookHandler = new LoreBookHandler(); m_bestiaryHandler = new BestiaryHandler(); m_achievementManager = new AchievementManager(); m_hintManager = new HintManager(); m_mapNotesController = new MapNotesController(p_eventManager); m_npcFactory = new NpcFactory(p_eventManager); m_saveGameManager = new DefaultSaveGameManager(); m_spiritBeaconController = new SpiritBeaconController(p_eventManager); m_worldMapController = new WorldMapController(p_eventManager); }
private static int get_TiledWidth(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); WorldMapController worldMapController = (WorldMapController)obj; float tiledWidth = worldMapController.TiledWidth; LuaDLL.lua_pushnumber(L, (double)tiledWidth); result = 1; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index TiledWidth on a nil value"); } return(result); }
private static int set_Offset(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); WorldMapController worldMapController = (WorldMapController)obj; Vector3 offset = ToLua.ToVector3(L, 2); worldMapController.Offset = offset; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index Offset on a nil value"); } return(result); }
private static int FocusTo(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 3); WorldMapController worldMapController = (WorldMapController)ToLua.CheckObject(L, 1, typeof(WorldMapController)); int x = (int)LuaDLL.luaL_checknumber(L, 2); int y = (int)LuaDLL.luaL_checknumber(L, 3); worldMapController.FocusTo(x, y); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
private static int set_TiledCount(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); WorldMapController worldMapController = (WorldMapController)obj; int tiledCount = (int)LuaDLL.luaL_checknumber(L, 2); worldMapController.TiledCount = tiledCount; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index TiledCount on a nil value"); } return(result); }
private static int set_DragVelocity(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); WorldMapController worldMapController = (WorldMapController)obj; float dragVelocity = (float)LuaDLL.luaL_checknumber(L, 2); worldMapController.DragVelocity = dragVelocity; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index DragVelocity on a nil value"); } return(result); }
private static int SetCamera(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 3); WorldMapController worldMapController = (WorldMapController)ToLua.CheckObject(L, 1, typeof(WorldMapController)); GameObject objCamera = (GameObject)ToLua.CheckUnityObject(L, 2, typeof(GameObject)); bool bNeedSetPos = LuaDLL.luaL_checkboolean(L, 3); worldMapController.SetCamera(objCamera, bNeedSetPos); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
private static int SetCallback(IntPtr L) { int result; try { ToLua.CheckArgsCount(L, 4); WorldMapController worldMapController = (WorldMapController)ToLua.CheckObject(L, 1, typeof(WorldMapController)); LuaFunction moveCoordinateLuaFunc = ToLua.CheckLuaFunction(L, 2); LuaFunction touchCoordinateLuaFunc = ToLua.CheckLuaFunction(L, 3); LuaFunction updateLuaFunc = ToLua.CheckLuaFunction(L, 4); worldMapController.SetCallback(moveCoordinateLuaFunc, touchCoordinateLuaFunc, updateLuaFunc); result = 0; } catch (Exception e) { result = LuaDLL.toluaL_exception(L, e, null); } return(result); }
public LandClaimMapData(ILogicObject area, WorldMapController worldMapController) { this.area = area; this.areaPrivateState = area.GetPrivateState <LandClaimAreaPrivateState>(); this.worldMapController = worldMapController; this.stateSubscriptionStorage = new StateSubscriptionStorage(); // add land claim mark control to map this.markControl = new WorldMapMarkLandClaim(); var canvasPosition = this.GetAreaCanvasPosition(); Canvas.SetLeft(this.markControl, canvasPosition.X); Canvas.SetTop(this.markControl, canvasPosition.Y); Panel.SetZIndex(this.markControl, 12); worldMapController.AddControl(this.markControl); this.areaPrivateState.ClientSubscribe( o => o.LastRaidTime, this.RefreshRaidedState, this.stateSubscriptionStorage); this.RefreshRaidedState(); }
public LandClaimMapData( ILogicObject area, WorldMapController worldMapController, ClientWorldMapLandClaimsGroupVisualizer landClaimGroupVisualizer, bool isFounder) { this.area = area; this.worldMapController = worldMapController; this.landClaimGroupVisualizer = landClaimGroupVisualizer; // add land claim mark control to map this.markControl = new WorldMapMarkLandClaim() { IsFounder = isFounder }; var canvasPosition = this.GetAreaCanvasPosition(); Canvas.SetLeft(this.markControl, canvasPosition.X); Canvas.SetTop(this.markControl, canvasPosition.Y); Panel.SetZIndex(this.markControl, 12); worldMapController.AddControl(this.markControl); this.landClaimGroupVisualizer.Register(this.area); }
void Awake() { Instance = this; }
void Awake() { worldMapCtrl = GetComponent<WorldMapController>(); }
public ClientWorldMapLastVehicleVisualizer(WorldMapController worldMapController) : base(worldMapController) { }
void Start() { WorldMapController = gameObject.GetComponent <WorldMapController>(); Helper = gameObject.GetComponent <Helper>(); Instructions = gameObject.GetComponent <Instructions>(); }