public static Vector3 Set3DUIWorldPos_ByScreenPoint(ref Vector3 worldPos, bool bMiniMap) { float num; float num2; return(MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldPos, bMiniMap, out num, out num2)); }
private void _updateNodePosition(GameObject node, PoolObjHandle <ActorRoot> actorRoot, bool bSmallMap) { if (!actorRoot) { return; } if (node != null) { MinimapSys theMinimapSys = Singleton <CBattleSystem> .GetInstance().TheMinimapSys; if (theMinimapSys == null) { return; } Vector3 vector = (Vector3)actorRoot.handle.location; Vector2 vector2 = bSmallMap ? theMinimapSys.GetMMFianlScreenPos() : theMinimapSys.GetBMFianlScreenPos(); Vector2 vector3 = bSmallMap ? theMinimapSys.mmFinalScreenSize : theMinimapSys.bmFinalScreenSize; float x; float y; node.transform.position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref vector, bSmallMap, out x, out y); if (!this.IsRectInside(x, y, vector2.x, vector2.y, vector3.x, vector3.y)) { this.SetUpdateAble(false); } } }
public void SetData(Vector3 worldpos, int type, uint id, bool b5v5 = false, bool bUseCache = true, bool bRefreshCache = false, bool bRefreshMM = true) { if (this.mmDragonNode_3dui != null && bRefreshMM) { if (this.mmDragonNode_ugui != null) { RectTransform rectTransform = this.mmDragonNode_ugui.transform as RectTransform; rectTransform.anchoredPosition = new Vector2(worldpos.x * Singleton <CBattleSystem> .instance.world_UI_Factor_Small.x, worldpos.z * Singleton <CBattleSystem> .instance.world_UI_Factor_Small.y); } Vector3 position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, true); this.mmDragonNode_3dui.transform.position = position; } if (this.bmDragonNode_3dui != null) { if (this.bmDragonNode_ugui != null) { RectTransform rectTransform2 = this.bmDragonNode_ugui.transform as RectTransform; rectTransform2.anchoredPosition = new Vector2(worldpos.x * Singleton <CBattleSystem> .instance.world_UI_Factor_Big.x, worldpos.z * Singleton <CBattleSystem> .instance.world_UI_Factor_Big.y); } if (bUseCache) { if (this.cachePos == Vector3.zero || bRefreshCache) { this.cachePos = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, false); } this.bmDragonNode_3dui.transform.position = this.cachePos; } else { this.bmDragonNode_3dui.transform.position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref worldpos, false); } } this.objid = id; }
public void Update(CUIFormScript formScript, float deltaTime) { if (this.m_duringTime < this.m_maxDuringTime) { this.m_duringTime += deltaTime; if (this.bSignalFollowActor()) { Vector3 vector = (Vector3)this.m_signalRelatedActor.get_handle().location; float x; float y; this.m_signalInUi.transform.position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref vector, true, out x, out y); if (this.m_signalInUIEffect != null && this.m_signalInUIEffect.parObj != null) { Vector2 vector2 = new Vector2(x, y); Singleton <CUIParticleSystem> .GetInstance().SetParticleScreenPosition(this.m_signalInUIEffect, ref vector2); } } } }
public void Initialize(CUIFormScript formScript, ResSignalInfo signalInfo) { if (this.m_playerID > 0u) { Player player = Singleton <GamePlayerCenter> .GetInstance().GetPlayer(this.m_playerID); if (player != null) { this.m_signalRelatedActor = player.Captain; } } this.m_signalInfo = signalInfo; if (this.m_signalInfo == null || formScript == null) { this.m_duringTime = 0f; this.m_maxDuringTime = 0f; return; } this.m_duringTime = 0f; this.m_maxDuringTime = (float)this.m_signalInfo.bTime; if (this.m_signalInfo.bSignalType == 0 && !string.IsNullOrEmpty(this.m_signalInfo.szSceneEffect)) { this.m_effectInScene = MonoSingleton <SceneMgr> .GetInstance().GetPooledGameObjLOD(this.m_signalInfo.szSceneEffect, true, SceneObjType.Temp, this.m_worldPosition); this.m_effectInScene.CustomSetActive(true); } if (this.m_bUseSignal && !string.IsNullOrEmpty(this.m_signalInfo.szUIIcon)) { if (this.m_signalInUi == null) { this.m_signalInUi = MiniMapSysUT.GetSignalGameObject(true); } if (this.m_signalInUi != null) { Vector3 vector = this.m_worldPosition; if (this.m_signalInfo.bSignalType == 1 && this.m_signalRelatedActor) { vector = (Vector3)this.m_signalRelatedActor.get_handle().location; } float x; float y; this.m_signalInUi.transform.position = MiniMapSysUT.Set3DUIWorldPos_ByScreenPoint(ref vector, true, out x, out y); if (!string.IsNullOrEmpty(this.m_signalInfo.szRealEffect) && this.m_signalInUi != null && Singleton <CBattleSystem> .get_instance().TheMinimapSys.CurMapType() == MinimapSys.EMapType.Mini) { Vector2 vector2 = new Vector2(x, y); if (Singleton <CBattleSystem> .get_instance().FightForm.GetSignalPanel().CheckSignalPositionValid(vector2)) { this.m_signalInUIEffect = Singleton <CUIParticleSystem> .get_instance().AddParticle(this.m_signalInfo.szRealEffect, (float)this.m_signalInfo.bTime, vector2); } } } } if (this.bUseCfgSound) { string text = StringHelper.UTF8BytesToString(ref this.m_signalInfo.szSound); if (!string.IsNullOrEmpty(text)) { Singleton <CSoundManager> .GetInstance().PlayBattleSound2D(text); } } }