public override void OnInitialize(ISkillRefactorProperty property) { m_Property = property; m_State = SkillState.Idle; m_Property.SetCurrentSkillState(m_State); m_IDToSkill = new Dictionary <int, SkillBase>(); m_RemoveSkillList = new List <int>(); m_ReleasedSkillDuringPress = new Dictionary <int, bool>(); m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_CfgLanguageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgLanguageProxy) as CfgLanguageProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_WeakSoundCD = m_CfgEternityProxy.GetGamingConfig(1).Value.Mine.Value.Sound.Value.WeaknessSoundCd; m_WeakSoundTmpCD = m_WeakSoundCD; m_WeakSoundProbability = m_CfgEternityProxy.GetGamingConfig(1).Value.Mine.Value.Sound.Value.WeaknessSoundRate; SkillBase.s_CfgSkillProxy = m_CfgSkillProxy; SkillBase.s_SkillProxy = m_SkillProxy; SkillBase.s_CfgLanguageProxy = m_CfgLanguageProxy; SkillBase.s_GameplayProxy = m_GameplayProxy; SkillBase.s_CfgEternityProxy = m_CfgEternityProxy; SetPreditionForAllSkillType(); // UNDONE, 声音 PreloadSkill(); }
public void GoTo(uint fromSceneID, ulong fromArea, uint toSceneID, ulong toArea) { if (fromArea == Constants.NOTSET_AREA_UID) { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; if (gameplayProxy.IsHasLeapBreak()) { return; } NetworkManager.Instance.GetSceneController().RequestStartLeap(fromArea, toArea); return; } m_LeapPath = null; m_LeapList = new Stack <Leap>(); if (fromSceneID == toSceneID) { m_LeapPath = GetTaskTrackingProxy().FindLeapPath(toSceneID, fromArea, toArea); } if (m_LeapPath != null) { while (m_LeapPath != null) { m_LeapList.Push(m_LeapPath.leap); m_LeapPath = m_LeapPath.prev; } m_LeapPath = null; if (m_LeapList.Count > 0) { SendLeap(); } } }
public override void OnInitialize(IHumanMotionProperty property) { m_HumanMotionProperty = property; GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_NavMeshPath = gameplayProxy.GetNavMeshPath(); m_MoveThreshold = m_HumanMotionProperty.GetRunSpeed(); m_ServerPosition = m_HumanMotionProperty.GetBornServerPosition(); m_ServerTargetPosition = m_HumanMotionProperty.GetBornServerPosition(); CorrectionServerPositionY(ref m_ServerTargetPosition); m_HumanMotionProperty.SetLocalPosition(m_ServerTargetPosition); m_tagetRotation = m_HumanMotionProperty.GetMovementRotationTransform().rotation; #if SHOW_HUMAN_ROAD_POINT m_ClineLines = m_HumanMotionProperty.GetTransform().gameObject.AddComponent <DrawLines>(); m_ServerLines = m_HumanMotionProperty.GetTransform().gameObject.AddComponent <DrawLines>(); m_ServerLines.LineColor = Color.red; m_ClineLines.AddPoint(m_HumanMotionProperty.GetLocalPosition()); m_ServerLines.AddPoint(m_HumanMotionProperty.GetLocalPosition()); #endif }
public override void OnLoopFXLoaded(EffectController vfx) { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity mainPlayer = gameplayProxy.GetMainPlayer(); if (mainPlayer != null) { if (gameplayProxy.CanAttackToTarget(mainPlayer, m_Buff.BuffProperty.GetOwner())) { // 隐身的时候只剩下特效. 如果是敌方隐身, 连特效都看不见了 List <EffectController> vfxList = m_Buff.BuffProperty.GetAllVFXs(); foreach (EffectController iVfx in vfxList) { // HACK. 如果不加这个if判断, 就会把隐身启动的特效一起隐藏掉 // 这里如果要完善这个逻辑, 需要做较多的工作. 我就直接偷个懒了. if (!iVfx.GetEffectObject().AutoStop) { iVfx.StopAndRecycleFX(true); } } m_Buff.BuffProperty.GetPresentation().SetVisibilityOfVFX(false); LayerUtil.SetGameObjectToLayer(m_Buff.BuffProperty.GetSkinRootTransform().gameObject, LayerTypeID.UnselectableSpacecraft, true); } } }
public override void OnHide(object msg) { m_SkillProxy = null; m_GameplayProxy = null; base.OnHide(msg); }
/// <summary> /// 状态改变 /// </summary> private void OnStateChanged() { GameplayProxy proxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity entity = proxy.GetEntityById <SpacecraftEntity>(proxy.GetMainPlayerUID()); if (entity != null) { //Debug.LogError(entity.GetCurrentState().IsHasSubState(EnumSubState.LeapPrepare)+", "+ entity.GetCurrentState().IsHasSubState(EnumSubState.Leaping)+", "+ entity.GetCurrentState().IsHasSubState(EnumSubState.LeapCancel)); if (entity.GetCurrentState().IsHasSubState(EnumSubState.LeapPrepare)) { OnLeapStart(proxy.GetLeapTargetAreaUid()); SetLeapState(LEAP_PHASE.READY); } else if (entity.GetCurrentState().IsHasSubState(EnumSubState.Leaping)) { SetLeapState(LEAP_PHASE.LEAP); } else { SetLeapState(LEAP_PHASE.NORMAL); } } else { SetLeapState(LEAP_PHASE.NORMAL); } }
public override void OnBuffRemove() { base.OnBuffRemove(); GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity mainPlayer = gameplayProxy.GetMainPlayer(); if (mainPlayer != null) { if (gameplayProxy.CanAttackToTarget(mainPlayer, m_Buff.BuffProperty.GetOwner())) { // 隐身的时候只剩下特效. 如果是敌方隐身, 连特效都看不见了 // 隐身时隐藏船的本体的功能是在VFXReplaceMeshWithSpacecraft里面做的 if (gameplayProxy.CanAttackToTarget(mainPlayer, m_Buff.BuffProperty.GetOwner())) { List <EffectController> vfxList = m_Buff.BuffProperty.GetAllVFXs(); foreach (EffectController iVfx in vfxList) { iVfx.SetCreateForMainPlayer(false); iVfx.PlayFX(); } } m_Buff.BuffProperty.GetPresentation().SetVisibilityOfVFX(true); // 现在创建隐身特效时直接把SkinRoot下面的所有东西都隐藏了. int spacecraftLayer = LayerUtil.GetLayerByHeroType(m_Buff.BuffProperty.GetHeroType(), m_Buff.BuffProperty.IsMain()); LayerUtil.SetGameObjectToLayer(m_Buff.BuffProperty.GetSkinRootTransform().gameObject, spacecraftLayer, true); } } m_Buff.BuffProperty.SetInvisible(false); }
public override void OnInitialize(IChangeMaterialProperty property) { m_Property = property; Npc npcVO = m_Property.GetNPCTemplateVO(); /// npcVO.TriggerRange m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_TreasureHuntProxy = GameFacade.Instance.RetrieveProxy(ProxyName.TreasureHuntProxy) as TreasureHuntProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_MainEntity = m_GameplayProxy.GetMainPlayer(); GamingConfigTreasure gamingConfigTreasure = m_CfgEternityProxy.GetGamingConfig(1).Value.Treasure.Value; GamingConfigTreasureColor colour = gamingConfigTreasure.Colour.Value; m_Colors[DistanceType.discovery] = colour.DiscoveryDistance; m_Colors[DistanceType.strong] = colour.StrongSignalDistance; m_Colors[DistanceType.medium] = colour.MediumSignalDistance; m_Colors[DistanceType.weak] = colour.WeakSignalDistance; GamingConfigTreasureFrequency frequency = gamingConfigTreasure.Frequency.Value; m_Frequencys[DistanceType.discovery] = frequency.DiscoveryDistance; m_Frequencys[DistanceType.strong] = frequency.StrongSignalDistance; m_Frequencys[DistanceType.medium] = frequency.MediumSignalDistance; m_Frequencys[DistanceType.weak] = frequency.WeakSignalDistance; GamingConfigTreasureSound sound = gamingConfigTreasure.Sound.Value; m_Sounds[DistanceType.none] = (int)sound.NoSignalDetector; m_Sounds[DistanceType.strong] = (int)sound.StrongSignalDetector; m_Sounds[DistanceType.medium] = (int)sound.MediumSignalDetector; m_Sounds[DistanceType.weak] = (int)sound.WeakSignalDetector; }
/// <summary> /// 是否可以取消跃迁 /// </summary> /// <returns></returns> private bool IsCanCancelLeap() { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity entity = gameplayProxy.GetEntityById <SpacecraftEntity>(gameplayProxy.GetMainPlayerUID()); return(!entity.GetCurrentState().IsHasSubState(EnumSubState.LeapCancel)); }
private void OnCollisionEnter(Collision collision) { if (!m_IsCollision) { Rigidbody rigidbody = m_Property.GetRigidbody(); Assert.IsFalse(rigidbody == null, "rigidbody is null"); GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; Assert.IsFalse(gameplayProxy == null, "gameplayProxy is null"); m_IsCollision = true; rigidbody.velocity = Vector3.zero; rigidbody.angularVelocity = Vector3.zero; rigidbody.freezeRotation = true; m_CollisionSet.Add(collision); if (m_Property.IsMain()) { HeroMoveHandler.SyncHitWall( true, m_Property.GetCurrentState().GetOnlyServerState(), gameplayProxy.GetCurrentAreaUid(), gameplayProxy.ClientToServerAreaOffset(rigidbody.position), rigidbody.rotation, rigidbody.velocity, rigidbody.angularVelocity ); } } }
private uint GetRoleLevel() { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; BaseEntity mainPlayer = gameplayProxy.GetEntityById <BaseEntity>(gameplayProxy.GetMainPlayerUID()); return(mainPlayer?.GetLevel() ?? 1); }
public Buff(BuffVO vo, IBuffProperty property) { VO = vo; BuffProperty = property; // Cache m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; Leyoutech.Utility.DebugUtility.LogWarning("Buff", string.Format("创建一个Buff ---> 归属entity = {0} , Buff ID = {1}", BuffProperty.EntityId(), VO.ID)); SkillBuff configVO = m_SkillProxy.GetBuff((int)VO.ID); if (configVO.ByteBuffer != null) { BuffEffect = BuffEffectBase.GetBuffEffectByType((BuffEffectType)configVO.BuffEffectId, this); Transform selfTf = BuffProperty.GetRootTransform(); SpacecraftEntity otherEntity = m_GameplayProxy.GetEntityById <SpacecraftEntity>(VO.Link_id) as SpacecraftEntity; Transform otherTf = null; if (otherEntity != null && !otherEntity.IsDead()) { otherTf = otherEntity.GetRootTransform(); } BuffEffect.Init(selfTf, otherTf); } else { BuffEffect = new BuffEffectBase(this); } }
protected override void Update() { GameplayProxy gameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity entity = gameplayProxy.GetEntityById <SpacecraftEntity>((uint)m_AIUid); if (entity == null || entity.transform == null) { UIManager.Instance.ClosePanel(this); return; } bool isInScreen = IsInScreen(entity.transform.position, Camera.main); //忽略屏幕外的 if (isInScreen) { //屏幕内显示图标 Vector3 screenPoint = Camera.main.WorldToScreenPoint(entity.transform.position); Vector2 localPoint = Vector2.zero; if (RectTransformUtility.ScreenPointToLocalPointInRectangle(m_Root, screenPoint, m_Camera, out localPoint)) { m_Icon.gameObject.SetActive(true); m_Icon.anchoredPosition = localPoint; //m_Animation.anchoredPosition = localPoint; //m_Icon.localScale = Vector3.one; //m_Animation.localScale = Vector3.one; } } else { m_Icon.gameObject.SetActive(false); } }
/// <summary> /// 更新准星的位置 /// </summary> protected override void Update() { RaycastTarget_OLD(); m_Root.gameObject.SetActive(!IsWatchOrUIInputMode() && !IsDead() && !IsLeaping()); if (m_Crosshair == null) return; if (m_WeaponStyle == WeaponAndCrossSight.WeaponAndCrossSightTypes.Null) { if (m_CurrentTarget != null) { GameplayProxy sceneProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity main = sceneProxy.GetEntityById<SpacecraftEntity>(sceneProxy.GetMainPlayerUID()); m_CurrentTarget = null; m_RaycastProxy.SetCurrentTarget(null); main.SetTarget(null, null); } return; } UpdateCrossHairPosition(); UpdateWeaponBullets(); UpdateWeaponCrosshairOffset(); UpdateTargetList(); UpdateShotPoint(); //RaycastTarget_OLD(); }
/// <summary> /// 弹夹信息,只有主角才有 /// </summary> /// <param name="result"></param> private static void DisposeSyncClipInfo(SyncClipInfo result) { //Leyoutech.Utility.DebugUtility.LogWarning("广播", string.Format("弹夹信息, 武器ID = {0}", result.CurWeaponUid)); GameplayProxy m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity entity = m_GameplayProxy.GetEntityById <SpacecraftEntity>(m_GameplayProxy.GetMainPlayerUID()); if (entity == null) { return; } PlayerSkillProxy m_PlayerSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_PlayerSkillProxy.ChangeCurrentWeaponByServer(result.CurWeaponUid); foreach (WeaponValue info in result.Infos) { ulong weaponUID = info.WeaponUid; WeaponPowerVO power = entity.GetWeaponPower(weaponUID); if (power == null) { entity.SetWeaponPower(weaponUID, new WeaponPowerVO()); power = entity.GetWeaponPower(weaponUID); } power.WeaponUID = info.WeaponUid; power.CurrentValue = info.CurValue; power.MaxValue = info.MaxValue; power.SafeValue = info.SaftyValue; IWeapon weapon = m_PlayerSkillProxy.GetWeaponByUID(power.WeaponUID); if (weapon != null && weapon.GetConfig().ClipType != (int)WeaponL1.Treasure) { if (power.CurrentValue <= 0) { power.ForceCooldown = true; } else if (power.CurrentValue >= power.SafeValue) { power.ForceCooldown = false; } } else { if (power.CurrentValue >= power.MaxValue) { power.ForceCooldown = true; } else if (power.CurrentValue <= power.SafeValue) { power.ForceCooldown = false; } } } GameFacade.Instance.SendNotification(NotificationName.MSG_CHARACTER_WEAPON_POWER_CHANGED); entity.SendEvent(ComponentEventName.WeaponPowerChanged, null); }
public override void OnHide(object msg) { HotkeyManager.Instance.Unregister("toggleMode_" + GetTransform().GetInstanceID()); m_GameplayProxy = null; base.OnHide(msg); }
public WeaponPowerVO GetCurrentWeaponPowerOfMainPlayer() { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity mainEntity = gameplayProxy.GetEntityById <SpacecraftEntity>(gameplayProxy.GetMainPlayerUID()); IWeapon curWeapon = GetCurrentWeapon(); return(curWeapon != null?mainEntity.GetWeaponPower(curWeapon.GetUID()) : null); }
/// <summary> /// 获取GameplayProxy /// </summary> /// <returns></returns> public GameplayProxy GetGameplayProxy() { if (m_GameplayProxy == null) { m_GameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; } return(m_GameplayProxy); }
public override void OnShow(object msg) { base.OnShow(msg); m_Gameplay = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; StartUpdate(); }
private void OnSyncContactGeometry(KProtoBuf buffer) { S2C_SYNC_CONTACT_GEOMETRY respond = buffer as S2C_SYNC_CONTACT_GEOMETRY; GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; DrawGeometry.Instance.Clear(); foreach (GeometryInfo item in respond.geometry_list) { if (item.draw_type == 0) { //Debug.LogError("Draw Cube center_pos:" + JsonUtility.ToJson(item.center_pos) // + " box_size: " + JsonUtility.ToJson(item.box_size) // + " rotation: " + item.rotation); DrawGeometry.Instance.DrawPrimitive( PrimitiveType.Cube, gameplayProxy.ServerAreaOffsetToClientPosition(VectorsToVector3(item.center_pos)), VectorsToVector3(item.box_size), QuaternionToQuaternion(item.rotation) ); } else if (item.draw_type == 1) { //Debug.LogError("Draw Direcrion start_pos:" + JsonUtility.ToJson(item.start_pos) // + "ship_rotation:" + JsonUtility.ToJson(item.ship_rotation) // + " move_rotation: " + JsonUtility.ToJson(item.move_dir)); DrawGeometry.Instance.DrawDirection( gameplayProxy.ServerAreaOffsetToClientPosition(VectorsToVector3(item.start_pos)), QuaternionToQuaternion(item.ship_rotation), Color.red ); if (VectorsToVector3(item.move_dir) != Vector3.zero) { DrawGeometry.Instance.DrawDirection( gameplayProxy.ServerAreaOffsetToClientPosition(VectorsToVector3(item.start_pos)), Quaternion.LookRotation(VectorsToVector3(item.move_dir)), Color.blue ); } } else if (item.draw_type == 2) { //Debug.LogError("Draw Capsule center_pos:" + JsonUtility.ToJson(item.center_pos) // + " capsule_scale: " + JsonUtility.ToJson(item.capsule_scale) // + " rotation: " + JsonUtility.ToJson(item.rotation)); DrawGeometry.Instance.DrawPrimitive( PrimitiveType.Capsule, gameplayProxy.ServerAreaOffsetToClientPosition(VectorsToVector3(item.center_pos)), VectorsToVector3(item.capsule_scale), QuaternionToQuaternion(item.rotation) ); } } }
public void OnInitialize(EntityManager entityManager) { m_EntityManager = entityManager; ListenGameServer(); m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_PlayerSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; }
public override void OnInitialize(IBattleWeaponProperty property) { m_Property = property; m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_CfgLanguageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgLanguageProxy) as CfgLanguageProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; }
protected override void Update() { if (!m_Content) { return; } if (!m_Content.gameObject.activeSelf) { return; } GameplayProxy proxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity main = proxy.GetEntityById <SpacecraftEntity>(proxy.GetMainPlayerUID()); if (main == null) { return; } Transform mainShadow = main.GetSyncTarget(); if (mainShadow == null) { return; } Rigidbody rigidbody = mainShadow.GetComponent <Rigidbody>(); if (rigidbody == null) { return; } SpacecraftMotionComponent mainMotion = main.GetEntityComponent <SpacecraftMotionComponent>(); if (mainMotion == null) { return; } SpacecraftMotionInfo cruiseMotion = mainMotion.GetCruiseModeMotionInfo(); Vector3 velocity = rigidbody.transform.InverseTransformDirection(rigidbody.velocity); float upSpeed = velocity.y; float upSpeedMax = cruiseMotion.LineVelocityMax.y; float upSpeedPercent = Mathf.Clamp01(Mathf.Abs(upSpeed) / Mathf.Abs(upSpeedMax)); float dir = upSpeedPercent * (upSpeed > 0 ? 1 : -1); m_Content.SetBool("Opened", upSpeed != 0); m_AltitudeRule.FillAmount = 0.5f - upSpeedPercent * dir * 0.5f; m_AltitudeArrow.FillAmount = 0.5f + upSpeedPercent * dir * 0.5f; //Debug.LogError(string.Format("{0:N2}/{1:N2} = {2:N3}", upSpeed, upSpeedMax, upSpeedPercent)); }
public MSAIBossProxy() : base(ProxyName.MSAIBossProxy) { m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_GameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_JujubeBattlefield = m_CfgEternityProxy.GetGamingConfig(1).Value.JujubeBattlefield.Value; m_NearbyVoices[0] = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNest; m_NearbyVoices[1] = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNestII; m_NearbyVoices[2] = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNestIII; }
public WeaponAndCrossSight(ulong uId, uint tId, ulong skillId) { m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_PlayerSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_UId = uId; m_SkillID = skillId; m_WeaponTable = m_CfgEternityProxy.GetWeapon(tId); }
public override void OnShow(object msg) { base.OnShow(msg); m_GameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; HotkeyManager.Instance.Register("toggleMode_" + GetTransform().GetInstanceID(), HotKeyMapID.SHIP, HotKeyID.ShipSwitchMode, OnToggleMode, m_HotkeyBox, "", HotkeyManager.HotkeyStyle.UI_SIMPLE); StartUpdate(); }
public void RequestRelive(PlayerReliveType playerReliveType) { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; C2S_PLAYER_RELIVE request = SingleInstanceCache.GetInstanceByType <C2S_PLAYER_RELIVE>(); request.protocolID = (ushort)KC2S_Protocol.c2s_player_relive; request.relive_type = (ushort)playerReliveType; NetworkManager.Instance.SendToGameServer(request); }
public override void OnShow(object msg) { base.OnShow(msg); m_GamePlayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_EternityProxy = Facade.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_TrakingProxy = Facade.RetrieveProxy(ProxyName.TaskTrackingProxy) as TaskTrackingProxy; StartUpdate(); }
/// <summary> /// 是否在跃迁中 /// </summary> /// <returns>bool</returns> protected bool IsLeaping() { GameplayProxy proxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; SpacecraftEntity entity = proxy.GetEntityById <SpacecraftEntity>(proxy.GetMainPlayerUID()); if (entity) { return(entity.IsLeap()); } return(false); }
public void SwitchMap(Scene scene) { GameplayProxy gameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; gameplayProxy.Clear(); gameplayProxy.GameMainScene = scene; Clear(); m_EntityManager.SwitchMap(scene); m_ProtocolLogic.SendGsAppleScene(); }