Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | {
|
| | | if (isPlaying && _task.state == TaskState.ReadFileFailure)
|
| | | {
|
| | | Thread.Sleep(30);
|
| | | ReadFile(_task, OnEndReadFile<T>);
|
| | | }
|
| | | else
|
| | |
| | | if (isPlaying && _task.state == TaskState.ParseFailure)
|
| | | {
|
| | | Debug.LogFormat("配置表解析失败:{0}", _task.taskName);
|
| | | Thread.Sleep(30);
|
| | | ReadFile(_task, OnEndReadFile<T>);
|
| | | }
|
| | | }
|
| | |
| | | using TableConfig; |
| | | using Snxxz.UI; |
| | | |
| | | //04 28 玩家上马#tagPlayerRideHorse |
| | | //04 28 �������#tagPlayerRideHorse |
| | | |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | if (_hero == null || _hero.MovingState == E_MovingState.Ride) |
| | | if (_hero == null |
| | | || _hero.MovingState == E_MovingState.Ride |
| | | || _hero.IsPolyMorph) |
| | | { |
| | | return; |
| | | } |
| | |
| | |
|
| | | if (_attacker is GA_Player)
|
| | | {
|
| | | var _hero = _cTarget as GA_Hero;
|
| | |
|
| | | if (PlayerDatas.Instance.extersion.bossState == 1)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | | if (_hero.SelectTarget == null
|
| | | || _hero.SelectTarget is GActorNpcFight)
|
| | | {
|
| | | _hero.SelectTarget = _hero.LockTarget = _attacker;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_hero != null && _hero.MovingState == E_MovingState.Ride)
|
| | | {
|
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false);
|
| | | _hero.SwitchHorse(0);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | if (AttackHandler.CheckPull(_attacker, _cTarget, 0))
|
| | | {
|
| | | _cTarget.StartBeatBack(0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | _cTarget.StartBeatBack(_attacker.ServerInstID, 0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | GAMgr.Instance.OnPlayerSyncCountChange();
|
| | | }
|
| | |
|
| | | if (_attacker is GA_Player)
|
| | | {
|
| | | var _hero = _cTarget as GA_Hero;
|
| | | if (_hero != null && _hero.MovingState == E_MovingState.Ride)
|
| | | {
|
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false);
|
| | | _hero.SwitchHorse(0);
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (_attacker.ServerInstID == PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | |
| | |
|
| | | if (AttackHandler.CheckPull(_attacker, _cTarget, 0))
|
| | | {
|
| | | _cTarget.StartBeatBack(0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | _cTarget.StartBeatBack(_attacker.ServerInstID, 0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | }
|
| | |
|
| | | if (_sTarget.HurtHP != 0)
|
| | |
| | |
|
| | | if (AttackHandler.CheckPull(_attacker, _cTarget, 0))
|
| | | {
|
| | | _cTarget.StartBeatBack(0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | _cTarget.StartBeatBack(_attacker.ServerInstID, 0, MathUtility.ForwardXZ(_cTarget.Pos, _attacker.Pos));
|
| | | }
|
| | |
|
| | | if (_sTarget.HurtHP != 0)
|
| | |
| | | UserInputHandler.OnCirclePanelTouched += OnActiveInterrupt;
|
| | | UserInputHandler.OnClickedFloor += OnClickFloor;
|
| | | GA_Hero.OnLockTargetChanged += OnLockTargetChanged;
|
| | | GA_Hero.OnUserClickSkill += OnUserClickSkill;
|
| | | HeroBehaviour.OnUserClickSkill += OnUserClickSkill;
|
| | |
|
| | | OnEnter();
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | | if (_hero.IsPolyMorph)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (_hero.SelectTarget == _hero)
|
| | | {
|
| | |
| | |
|
| | | break;
|
| | | case 1:// 暂停状态
|
| | |
|
| | | if (m_NeedMoveToPos)
|
| | | {
|
| | | if (StatusMgr.Instance.CanMove(PlayerDatas.Instance.PlayerId))
|
| | |
| | | }
|
| | | UserInputHandler.OnCirclePanelTouched -= OnActiveInterrupt;
|
| | | UserInputHandler.OnClickedFloor -= OnClickFloor;
|
| | | GA_Hero.OnUserClickSkill -= OnUserClickSkill;
|
| | | HeroBehaviour.OnUserClickSkill -= OnUserClickSkill;
|
| | |
|
| | | OnExit();
|
| | | }
|
| | |
| | |
|
| | | UserInputHandler.OnCirclePanelTouched += OnActiveInterrupt;
|
| | | UserInputHandler.OnClickedFloor += OnClickFloor;
|
| | | GA_Hero.OnUserClickSkill += OnUserClickSkill;
|
| | | HeroBehaviour.OnUserClickSkill += OnUserClickSkill;
|
| | | GA_Hero.OnLockTargetChanged += OnLockTargetChanged;
|
| | | HeroBehaviour.OnStartHandupAI += OnStartHandupAI;
|
| | | MapTransferUtility.s_OnHeroStartMoveToNPC += OnStartMoveToNpc;
|
| | |
| | | {
|
| | | UserInputHandler.OnCirclePanelTouched -= OnActiveInterrupt;
|
| | | UserInputHandler.OnClickedFloor -= OnClickFloor;
|
| | | GA_Hero.OnUserClickSkill -= OnUserClickSkill;
|
| | | HeroBehaviour.OnUserClickSkill -= OnUserClickSkill;
|
| | | GA_Hero.OnLockTargetChanged -= OnLockTargetChanged;
|
| | | HeroBehaviour.OnStartHandupAI -= OnStartHandupAI;
|
| | | MapTransferUtility.s_OnHeroStartMoveToNPC -= OnStartMoveToNpc;
|
| | |
| | |
|
| | | public static event UnityAction<int> onCastSkill;
|
| | |
|
| | | /// <summary>
|
| | | /// 当用户点击了技能按钮, 并切技能可以释放的时候调用
|
| | | /// </summary>
|
| | | public static event UnityAction<int> OnUserClickSkill;
|
| | |
|
| | | public enum E_BehaviourState
|
| | | {
|
| | | None,
|
| | |
| | | || MapArea.IsInMapArea(m_Hero.CurMapArea, MapArea.E_Type.RebornSafe))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("NoFighting");
|
| | | return;
|
| | | }
|
| | |
|
| | | if (m_Hero.IsPolyMorph)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | _data.targetServerInstID = m_Hero.SelectTarget.ServerInstID;
|
| | | _data.defaultSkillID = m_WillUsedSkillID;
|
| | | m_Hero.aiHandler.currentType = E_HeroAIType.KillUntilDie;
|
| | | }
|
| | |
|
| | | if(OnUserClickSkill != null)
|
| | | {
|
| | | OnUserClickSkill(m_WillUsedSkillID);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | // 人物, 非小怪不计算伤害,不生成客户端数据
|
| | | if (_target.ActorType == GameObjType.gotPlayer)
|
| | | {
|
| | | GA_Player _player = _target as GA_Player;
|
| | | if (_player != null)
|
| | | {
|
| | | if (_player.MovingState == E_MovingState.Ride)
|
| | | {
|
| | | _player.SwitchHorse(0);
|
| | | }
|
| | | }
|
| | | continue;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (CheckPull(attacker, target, soConfig.bodyControlId))
|
| | | {
|
| | | target.StartBeatBack(soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos));
|
| | | target.StartBeatBack(attacker.ServerInstID, soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | // 攻击者是玩家
|
| | | if (attacker.ActorType == GameObjType.gotPlayer)
|
| | | {
|
| | | return false;
|
| | | return _bodyControl.useForPlayer && target.CanPushedBack();
|
| | | }
|
| | | else if (attacker.ActorType == GameObjType.gotNPC)
|
| | | {
|
| | |
| | | |
| | | [Tooltip("表现的时间")] |
| | | public float duration;// 移动时间 |
| | | |
| | | [Tooltip("是否对玩家类型生效")] |
| | | public bool useForPlayer = false; |
| | | |
| | | [Tooltip("是推还是拉, 打钩是推,不打钩是拉")] |
| | | public bool pushOrPull = true; |
| | | |
| | | [Tooltip(@"限制位置, 以释放者为中心的偏移 |
| | | 可以为负值")] |
| | | public float limitDistance = 100; |
| | | } |
| | |
| | |
|
| | | protected void AddToNpcPosList(GActorFight attacker, GActorFight target, int bodyControlId, Vector3 direction, List<NPCPos> npcPosList)
|
| | | {
|
| | | // Debug.LogFormat("{0} attack {1} ==================== 0", attacker.GetType().ToString(), target.GetType().ToString());
|
| | | if (PreFightMission.Instance.IsFinished() == false)
|
| | | {
|
| | | return;
|
| | |
| | |
|
| | | SoBodyControl _bodyControl = ScriptableObjectLoader.LoadSoBodyControl(bodyControlId);
|
| | |
|
| | | if (!_bodyControl.pushOrPull)
|
| | | {
|
| | | direction = -direction;
|
| | | }
|
| | |
|
| | | float _distance = _bodyControl.curve.keys[_bodyControl.curve.length - 1].time;
|
| | |
|
| | | Vector3 _checkPos = target.Pos;
|
| | | Vector3 _pullPosition = _checkPos + direction * _distance;
|
| | |
|
| | | if (!_bodyControl.pushOrPull)
|
| | | {
|
| | | _pullPosition = attacker.Pos + MathUtility.ForwardXZ(target.Pos, attacker.Pos) * 0.5f;
|
| | | }
|
| | |
|
| | | _checkPos.y = 0;
|
| | | _pullPosition.y = 0;
|
| | |
| | | _pullPosition = _hit.position;
|
| | | }
|
| | |
|
| | | // 只认主角导致的推逻辑. 如果是其他人的退不认
|
| | | if (target is GActorNpcFight)
|
| | | {
|
| | | if (attacker is GA_Player)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (GActor.TryGetValidPos(_pullPosition, ref _checkPos))
|
| | | {
|
| | | if (target.ActorType == GameObjType.gotPlayer)
|
| | | {
|
| | | GActorPlayerBase _player = target as GActorPlayerBase;
|
| | | //Debug.Log("--------------------------- 8");
|
| | | if (_player.MovingState != E_MovingState.Ride)
|
| | | if (target is GA_Hero)
|
| | | {
|
| | | //Debug.Log("--------------------------- 9");
|
| | | CB402_tagCMNPCBeatBack _beatBack = new CB402_tagCMNPCBeatBack();
|
| | | _beatBack.ObjType = (byte)GameObjType.gotPlayer;
|
| | | _beatBack.Count = 1;
|
| | | _beatBack.NPCPosList = new CB402_tagCMNPCBeatBack.tagCMNPCPos[1];
|
| | | _beatBack.NPCPosList[0] = new CB402_tagCMNPCBeatBack.tagCMNPCPos();
|
| | | _beatBack.NPCPosList[0].ObjID = (uint)target.ServerInstID;
|
| | | _beatBack.NPCPosList[0].PosX = (ushort)(_checkPos.x * 2f + GA_Hero.MapOffset.x);
|
| | | _beatBack.NPCPosList[0].PosY = (ushort)(_checkPos.z * 2f + GA_Hero.MapOffset.x);
|
| | | GameNetSystem.Instance.SendInfo(_beatBack);
|
| | | GActorPlayerBase _player = target as GActorPlayerBase;
|
| | | //Debug.Log("--------------------------- 8");
|
| | | if (_player.MovingState != E_MovingState.Ride)
|
| | | {
|
| | | // Debug.LogFormat("{0} attack {1} ==================== 9", attacker.GetType().ToString(), target.GetType().ToString());
|
| | | CB402_tagCMNPCBeatBack _beatBack = new CB402_tagCMNPCBeatBack();
|
| | | _beatBack.ObjType = (byte)GameObjType.gotPlayer;
|
| | | _beatBack.Count = 1;
|
| | | _beatBack.NPCPosList = new CB402_tagCMNPCBeatBack.tagCMNPCPos[1];
|
| | | _beatBack.NPCPosList[0] = new CB402_tagCMNPCBeatBack.tagCMNPCPos();
|
| | | _beatBack.NPCPosList[0].ObjID = (uint)target.ServerInstID;
|
| | | _beatBack.NPCPosList[0].PosX = (ushort)(_checkPos.x * 2f + GA_Hero.MapOffset.x);
|
| | | _beatBack.NPCPosList[0].PosY = (ushort)(_checkPos.z * 2f + GA_Hero.MapOffset.z);
|
| | | GameNetSystem.Instance.SendInfo(_beatBack);
|
| | | }
|
| | | }
|
| | | //else
|
| | | //{
|
| | |
| | | NPCPos _npcPos = new NPCPos
|
| | | {
|
| | | objId = (int)target.ServerInstID,
|
| | | posX = (int)(_checkPos.x * 2f),
|
| | | posY = (int)(_checkPos.z * 2f)
|
| | | posX = (int)(_checkPos.x * 2f + GA_Hero.MapOffset.x),
|
| | | posY = (int)(_checkPos.z * 2f + GA_Hero.MapOffset.z)
|
| | | };
|
| | | npcPosList.Add(_npcPos);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | //Debug.LogFormat("{0} 攻击 {1}, 境界: {2} <=> {3}, 是否产生了压制: {4}",
|
| | | // caster.ServerInstID, target.ServerInstID, _casterRealm, _targetRealm, _casterRealm > _targetRealm);
|
| | | if (attackType == (int)HurtAttackType.Suppress)
|
| | | {
|
| | | _casterRealm = 1;
|
| | | _targetRealm = 0;
|
| | | _pattern = (PopUpNum.Pattern)(((int)HurtAttackType.Normal - 1) * 3);
|
| | | }
|
| | |
|
| | | var popupInfo = new PopUpNum.PopupInfo()
|
| | | {
|
| | |
| | | /// 当切换锁定目标的时候, 为空的时候id=0
|
| | | /// </summary>
|
| | | public static event UnityAction<uint> OnLockTargetChanged;
|
| | | /// <summary>
|
| | | /// 当用户点击了技能按钮, 并切技能可以释放的时候调用
|
| | | /// </summary>
|
| | | public static event UnityAction<int> OnUserClickSkill;
|
| | | public static event UnityAction<uint, string> OnKillPlayer;
|
| | |
|
| | | private GameObject m_Light;
|
| | |
| | | && !IsDaZuo()
|
| | | && State != E_ActorState.Roll
|
| | | && !s_MapSwitching
|
| | | && !heavenBattleModel.IsBattlePrepare;
|
| | | && !heavenBattleModel.IsBattlePrepare
|
| | | && !m_Beating;
|
| | | }
|
| | |
|
| | | public bool CanCastSkill()
|
| | |
| | | && State != E_ActorState.Roll
|
| | | && State != E_ActorState.Mocked
|
| | | && !s_MapSwitching
|
| | | && !heavenBattleModel.IsBattlePrepare;
|
| | | && !heavenBattleModel.IsBattlePrepare
|
| | | && !m_Beating;
|
| | | }
|
| | |
|
| | | public void StopAll()
|
| | |
| | | }
|
| | |
|
| | | Behaviour.StartKillUntilDieAI();
|
| | |
|
| | | if (OnUserClickSkill != null)
|
| | | {
|
| | | OnUserClickSkill(0);
|
| | | }
|
| | | }
|
| | |
|
| | | public void CastSkill(int skillID)
|
| | |
| | | }
|
| | |
|
| | | Behaviour.StartKillUntilDieAI(skillID);
|
| | |
|
| | | if (OnUserClickSkill != null)
|
| | | {
|
| | | OnUserClickSkill(skillID);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | private float m_BeatStartTime;
|
| | | protected bool m_Beating;
|
| | | private Vector3 m_BeatDirection;
|
| | | private bool m_PushOrPull;
|
| | | private uint m_AttackerSID;
|
| | | private float m_LimitDistance;
|
| | |
|
| | | public void StartBeatBack(int configID, Vector3 direction)
|
| | | public void StartBeatBack(uint attacker, int configID, Vector3 direction)
|
| | | {
|
| | | SoBodyControl _config = ScriptableObjectLoader.LoadSoBodyControl(configID);
|
| | |
|
| | | if (_config == null || _config.curve == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | m_AttackerSID = attacker;
|
| | | m_LimitDistance = _config.limitDistance;
|
| | | m_PushOrPull = _config.pushOrPull;
|
| | |
|
| | | if (!m_PushOrPull)
|
| | | {
|
| | | direction = -direction;
|
| | | }
|
| | |
|
| | | m_BeatDirection = direction;
|
| | |
| | | Vector3 _pos = m_StartBeatPos + _h + _v;
|
| | | Vector3 _end = _pos;
|
| | |
|
| | | GActor _attacker = GAMgr.Instance.GetBySID(m_AttackerSID);
|
| | |
|
| | | float _dis = MathUtility.DistanceSqrtXZ(_attacker.Pos, _end);
|
| | |
|
| | | if (m_PushOrPull)
|
| | | {
|
| | | if (MathUtility.DistanceSqrtXZ(_attacker.Pos, _end) > m_LimitDistance * m_LimitDistance)
|
| | | {
|
| | | _end = _attacker.Pos + m_BeatDirection * m_LimitDistance;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | Vector3 _limPos = _attacker.Pos;
|
| | | _limPos.y = 0;
|
| | | _limPos = _limPos - m_BeatDirection * m_LimitDistance;
|
| | | Vector3 _dir2 = (_end - _limPos).normalized;
|
| | |
|
| | | bool _isOp = MathUtility.OppositeDir(-m_BeatDirection, _dir2);
|
| | | bool _isLimDis = MathUtility.DistanceSqrtXZ(_attacker.Pos, _end) < m_LimitDistance * m_LimitDistance;
|
| | |
|
| | | if (_isOp
|
| | | || _isLimDis)
|
| | | {
|
| | | _end = _attacker.Pos - m_BeatDirection * m_LimitDistance;
|
| | | needSyncGroundHeight = true;
|
| | | m_Beating = false;
|
| | | }
|
| | | }
|
| | |
|
| | | Vector3 _position = m_StartBeatPos;
|
| | | _position.y = 0;
|
| | | _end.y = 0;
|
| | |
| | | protected HeadUpName m_HeadUpName = null;
|
| | |
|
| | | private int m_HorseActionType = 0;
|
| | | public int nextComAtkIndex = -1;
|
| | |
|
| | | public JobSetupConfig JobSetup { get; protected set; }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int nextComAtkIndex = -1;
|
| | |
|
| | | public void SwitchHeadNameBindNode(bool castingSkill)
|
| | | {
|
| | | // 角色被隐藏状态下不执行头顶名称切换逻辑
|
| | |
| | | {
|
| | | m_HeadUpName.target = MP_Name;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsPolyMorph { get; private set; }
|
| | | private GameObject m_SheepModel;
|
| | | private bool m_SheepIsDefaultNpc;
|
| | | public virtual void Polymorph(bool doOrNo)
|
| | | {
|
| | | IsPolyMorph = doOrNo;
|
| | |
|
| | | if (IsPolyMorph)
|
| | | {
|
| | | ChangeBinderToRoot();
|
| | |
|
| | | // 正在骑乘状态下
|
| | | if (MovingState == E_MovingState.Ride)
|
| | | {
|
| | | m_HorseModel.transform.position = Constants.Special_Hide_Position;
|
| | | SwitchHorse(0);
|
| | | DTC0428_tagPlayerRideHorse.Send_tagPlayerRideHorse(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ClothesModel.transform.position = Constants.Special_Hide_Position;
|
| | | }
|
| | |
|
| | | m_SheepIsDefaultNpc = false;
|
| | | var _p = InstanceResourcesLoader.LoadNpc(10101001);
|
| | | if (_p == null)
|
| | | {
|
| | | _p = InstanceResourcesLoader.LoadDefaultFightNPC();
|
| | | m_SheepIsDefaultNpc = true;
|
| | | }
|
| | |
|
| | | m_SheepModel = GameObjectPoolManager.Instance.RequestGameObject(_p);
|
| | | m_SheepModel.transform.SetParent(m_Root);
|
| | |
|
| | | var _a = m_SheepModel.GetComponent<Animator>();
|
| | | if (_a)
|
| | | {
|
| | | _a.enabled = true;
|
| | | _a.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
|
| | | m_ClothesAnimator.enabled = false;
|
| | | m_ClothesAnimator = _a;
|
| | | }
|
| | |
|
| | | if (ShowOrHide)
|
| | | {
|
| | | m_SheepModel.transform.localPosition = Vector3.zero;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SheepModel.transform.localPosition = Constants.Special_Hide_Position;
|
| | | }
|
| | |
|
| | | m_SheepModel.transform.localRotation = Quaternion.identity;
|
| | | }
|
| | | else
|
| | | {
|
| | | if (m_SheepModel)
|
| | | {
|
| | | if (m_SheepIsDefaultNpc)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultFightNPC(m_SheepModel);
|
| | | }
|
| | | else
|
| | | {
|
| | | var _prefab = InstanceResourcesLoader.LoadNpc(10101001);
|
| | | GameObjectPoolManager.Instance.ReleaseGameObject(_prefab, m_SheepModel);
|
| | | }
|
| | | }
|
| | |
|
| | | m_SheepModel = null;
|
| | | m_ClothesModel.transform.localPosition = Vector3.zero;
|
| | |
|
| | | ChangeBinderToClothes();
|
| | |
|
| | | m_ClothesAnimator = m_ClothesModel.GetComponent<Animator>();
|
| | | m_ClothesAnimator.enabled = true;
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_ActorInstID, (int)ClientInstID);
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_MoveState, (int)E_MovingState.Normal);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | if (ShowOrHide)
|
| | | {
|
| | | m_ClothesModel.transform.localPosition = Vector3.zero;
|
| | | m_ClothesModel.transform.localRotation = Quaternion.identity;
|
| | | if (!IsPolyMorph)
|
| | | {
|
| | | m_ClothesModel.transform.localPosition = Vector3.zero;
|
| | | m_ClothesModel.transform.localRotation = Quaternion.identity;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (m_WingModel)
|
| | | {
|
| | | MovingState = E_MovingState.Fly;
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_MoveState, (int)E_MovingState.Fly);
|
| | | if (!IsPolyMorph)
|
| | | {
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_MoveState, (int)E_MovingState.Fly);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | MovingState = E_MovingState.Normal;
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_MoveState, (int)E_MovingState.Normal);
|
| | | if (!IsPolyMorph)
|
| | | {
|
| | | m_ClothesAnimator.SetInteger(GAStaticDefine.Param_MoveState, (int)E_MovingState.Normal);
|
| | | }
|
| | | }
|
| | |
|
| | | SwitchHeadNameBindNode(false);
|
| | |
| | | _model2.clickClosed = false;
|
| | |
|
| | | m_AfterAttackType = E_AfterAttackType.RefreshRock;
|
| | | GA_Hero.OnUserClickSkill += OnCastSkill;
|
| | | HeroBehaviour.OnUserClickSkill += OnCastSkill;
|
| | |
|
| | | _model2.onClose = null;
|
| | |
|
| | |
| | |
|
| | | private void OnCastSkill(int skillID)
|
| | | {
|
| | | GA_Hero.OnUserClickSkill -= OnCastSkill;
|
| | | HeroBehaviour.OnUserClickSkill -= OnCastSkill;
|
| | |
|
| | | if (m_AfterAttackType == E_AfterAttackType.RefreshRock)
|
| | | {
|
| | |
| | |
|
| | | public void ShowItem()
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | if (model.currentShowItem != default(PreciousItemGetModel.PreciousItem))
|
| | | {
|
| | | var itemModel = playerPack.GetItemModelByGUID(model.currentShowItem.guid);
|
| | |
| | | m_PreciousItem.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_PreciousItem.gameObject.SetActive(false);
|
| | | }
|
| | | model.isGetNewItem = false;
|
| | | }
|
| | |
| | | currentGuide = 0;
|
| | | WindowCenter.Instance.CloseImmediately<NewBieWin>();
|
| | |
|
| | | completeGuidesBuf.Add(guideRecord);
|
| | | if (!completeGuidesBuf.Contains(guideRecord))
|
| | | {
|
| | | completeGuidesBuf.Add(guideRecord);
|
| | | }
|
| | |
|
| | | var send = new CA222_tagCMSetGuideOK();
|
| | | send.GuideIndex = (byte)_id;
|
| | |
| | | private void SwitchGameFrame()
|
| | | {
|
| | | var gameFrame = SystemSetting.Instance.GetGameFrame();
|
| | | switch (gameFrame)
|
| | |
|
| | | if (gameFrame==GameFrame.HalfFrame)
|
| | | {
|
| | | case GameFrame.HalfFrame:
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.FullFrame);
|
| | | break;
|
| | | case GameFrame.FullFrame:
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.HalfFrame);
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.FullFrame);
|
| | | }
|
| | | else
|
| | | {
|
| | | SystemSetting.Instance.SetGameFrame(GameFrame.HalfFrame);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | bool rejectManual = false;
|
| | |
|
| | | TeamModel model { get { return ModelCenter.Instance.GetModel<TeamModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | if (NewBieCenter.Instance.inGuiding)
|
| | | {
|
| | | NewBieCenter.Instance.FinishNewBieGuide(NewBieCenter.Instance.currentGuide);
|
| | | }
|
| | |
|
| | | rejectManual = false;
|
| | | if (!model.myTeam.iamCaptainer)
|
| | | {
|
| | |
| | | IEnumerator Co_DelayCloseWin()
|
| | | {
|
| | | yield return null;
|
| | | WindowCenter.Instance.Open<TeamPrepareWin>();
|
| | | WindowCenter.Instance.Close<TeamPrepareWin>();
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | achievementBehaviour.linerMove.from = achievementBehaviour.rectTransform.anchoredPosition;
|
| | | var toY = achievementBehaviour.rectTransform.anchoredPosition.y + cellSize.y + spacing.y;
|
| | | achievementBehaviour.linerMove.to = achievementBehaviour.rectTransform.anchoredPosition.SetY(toY);
|
| | |
|
| | | achievementBehaviour.linerMove.duration = relocationTime;
|
| | | achievementBehaviour.linerMove.Begin();
|
| | | if (achievementBehaviour.linerMove.gameObject.activeInHierarchy)
|
| | | {
|
| | | achievementBehaviour.linerMove.Begin();
|
| | | }
|
| | | else
|
| | | {
|
| | | achievementBehaviour.linerMove.Stop();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
|
| | | packageModel.RefreshItemCountAct += OnPackageItemChange;
|
| | | WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideComplete;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | achievementModel.achievementProgressUpdateEvent -= OnAchievementProgressUpdate;
|
| | | achievementModel.achievementAwardableEvent -= OnAchievementAwardable;
|
| | | achievementModel.achievementCompletedEvent -= OnAchievementCompleted;
|
| | | NewBieCenter.Instance.guideCompletedEvent -= GuideComplete;
|
| | |
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= OnGetSkillLevelUpResult;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnTreasurePotentialSPChange;
|
| | |
| | | LocalSave.SetInt(StringUtility.Contact(_playerId, _type, "_TreasureUnlockShow"), _id);
|
| | | }
|
| | |
|
| | | public void SetTreasureStageShow(int _id,int _stage)
|
| | | public void SetTreasureStageShow(int _id, int _stage)
|
| | | {
|
| | | LocalSave.SetInt(StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,
|
| | | "_TreasureStageShow_", _id), _stage);
|
| | |
| | | newGotTreasureId = id;
|
| | | treasureEntranceShowId = id;
|
| | |
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<MainInterfaceWin>())
|
| | | {
|
| | | if (PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | | OpenTreasureNewGot();
|
| | | }
|
| | |
|
| | | if (treasureCollectingShowId == id)
|
| | |
| | | {
|
| | | if (_window is MainInterfaceWin)
|
| | | {
|
| | | if (newGotTreasureId != 0)
|
| | | {
|
| | | if (PreFightMission.Instance.IsFinished())
|
| | | {
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | | }
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | if (needDisplayReguluLevelUp)
|
| | | {
|
| | | CheckReguluPop();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void GuideComplete(int _id)
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | }
|
| | |
|
| | | IEnumerator Co_OpenTreasureNewGot()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS600;
|
| | | OpenTreasureNewGot();
|
| | | }
|
| | |
|
| | | public void CheckOpenTreasureNewGot()
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_OpenTreasureNewGot());
|
| | | }
|
| | |
|
| | | private void OpenTreasureNewGot()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage) || !serverInited)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (!PreFightMission.Instance.IsFinished() || newGotTreasureId == 0
|
| | | || NewBieCenter.Instance.inGuiding || !WindowCenter.Instance.CheckOpen<MainInterfaceWin>()
|
| | | || WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual(WindowType.Base)
|
| | | || WindowCenter.Instance.CheckOpen<TreasureNewGotWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
|
| | | var mapId = dungeonModel.GetDungeonDataIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | if (mapId == 41110)
|
| | | {
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<TreasureNewGotWin>();
|
| | | }
|
| | |
|
| | | private void UpdateSkillLevelUpRedpoint(int _treasureId)
|
| | | {
|
| | | if (treasures.ContainsKey(_treasureId))
|
| | |
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | ModelCenter.Instance.GetModel<TreasureModel>().CheckOpenTreasureNewGot();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
| | | public class MultipleRealmPointModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
|
| | | {
|
| | | public Redpoint multipleRed = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20908);
|
| | | public string LocalRecord_Key = "MultipleRealmRecord";
|
| | | public string LocalRecord_Key;
|
| | | bool isNewDay = false;
|
| | |
|
| | | public event Action<int> onStateUpate;
|
| | |
| | | public override void Init()
|
| | | {
|
| | | OpenServerActivityCenter.Instance.Register(8, this);
|
| | | |
| | | //StageManager.Instance.onStageLoadFinish += CheckReconnect;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | LocalRecord_Key = StringUtility.Contact(LocalRecord_Key, PlayerDatas.Instance.baseData.PlayerID);
|
| | | CheckShowRed();
|
| | | LocalRecord_Key = StringUtility.Contact("MultipleRealmRecord", PlayerDatas.Instance.baseData.PlayerID);
|
| | | OperationTimeHepler.Instance.operationStartEvent -= RefreshOperationState;
|
| | | OperationTimeHepler.Instance.operationStartEvent += RefreshOperationState;
|
| | | OperationTimeHepler.Instance.operationEndEvent -= RefreshOperationState;
|
| | | OperationTimeHepler.Instance.operationEndEvent += RefreshOperationState;
|
| | | OperationTimeHepler.Instance.operationServerCloseEvent -= RefreshOperationClose;
|
| | | OperationTimeHepler.Instance.operationServerCloseEvent += RefreshOperationClose;
|
| | | CheckShowRed();
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | |
| | | StageManager.Instance.onStageLoadFinish -= CheckReconnect;
|
| | | }
|
| | |
|
| | | public bool IsOpen
|
| | |
| | | return multipleRed.state == RedPointState.Simple;
|
| | | }
|
| | | }
|
| | |
|
| | | private void CheckReconnect()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | {
|
| | | CheckShowRed();
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void RefreshOperationClose(Operation type)
|
| | | {
|
| | |
| | |
|
| | | if(!isNewDay)
|
| | | {
|
| | | |
| | | if (!PlayerPrefs.HasKey(LocalRecord_Key))
|
| | | {
|
| | | DebugEx.Log("设置记录时间:" + TimeUtility.ServerNow.Day);
|
| | | LocalSave.SetInt(LocalRecord_Key, TimeUtility.ServerNow.Day);
|
| | | isNewDay = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | DebugEx.Log("得到记录时间:" + LocalSave.GetInt(LocalRecord_Key));
|
| | | if (TimeUtility.ServerNow.Day != LocalSave.GetInt(LocalRecord_Key))
|
| | | {
|
| | | isNewDay = true;
|
| | | DebugEx.Log("设置记录时间:" + TimeUtility.ServerNow.Day);
|
| | | LocalSave.SetInt(LocalRecord_Key, TimeUtility.ServerNow.Day);
|
| | | }
|
| | | }
|
| | |
| | | public event Action<Window> jumpWindowCloseEvent;
|
| | | List<string> closeAllIgnoreWindows = new List<string>() {
|
| | | "MessageWin", "NewBieWin", "NewItemGetWin", "AttributePromoteShowWin" ,"DungeonBeginCoolDownWin","DungeonFightWin","StatusTipWin"
|
| | | ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin"
|
| | | ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin",
|
| | | "TreasureDungeonMissionHintWin",
|
| | | };
|
| | |
|
| | | UIRoot m_UIRoot;
|
| | |
| | | /** 闪避 */
|
| | | Miss,
|
| | | /** 免疫 */
|
| | | Immune
|
| | | Immune,
|
| | | /** 压制 */
|
| | | Suppress
|
| | | }
|
| | |
|
| | | public enum E_PlayerState
|
| | |
| | | return (target - self).normalized; |
| | | } |
| | | |
| | | public static bool IsSameDir(Vector3 vec1, Vector3 vec2) |
| | | { |
| | | vec1.y = 0; |
| | | vec2.y = 0; |
| | | |
| | | return Vector3.Dot(vec1, vec2) > 0; |
| | | } |
| | | |
| | | public static bool OppositeDir(Vector3 vec1, Vector3 vec2) |
| | | { |
| | | vec1.y = 0; |
| | | vec2.y = 0; |
| | | |
| | | return Vector3.Dot(vec1, vec2) < 0; |
| | | } |
| | | public static int Power(int a, int e) |
| | | { |
| | | int value = 1; |
| | |
| | | currentResolution = ConvertResolution(new Vector2(1280, 720));
|
| | | break;
|
| | | case GameQuality.Medium:
|
| | | currentResolution = ConvertResolution(new Vector2(1280, 720));
|
| | | currentResolution = ConvertResolution(new Vector2(1920, 1080));
|
| | | break;
|
| | | case GameQuality.High:
|
| | | currentResolution = ConvertResolution(new Vector2(1920, 1080));
|
| | |
| | |
|
| | | if (GUILayout.Button("酷酷酷"))
|
| | | {
|
| | |
|
| | | PlayerDatas.Instance.hero.Polymorph(!PlayerDatas.Instance.hero.IsPolyMorph);
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("直接重连"))
|