public void LateUpdate(int nDelta) { if (this.skillSlot == null || this.skillSlot.SkillObj == null || this.skillSlot.SkillObj.cfgData == null) { return; } if (this.effectHideFrameNum > 0 && Time.frameCount > this.effectHideFrameNum) { this.ForceSetGuildPrefabShow(false); this.effectHideFrameNum = 0; } this.pressTime += nDelta; if (this.effectPrefab != null) { if (this.bMoveFlag) { Vector3 b = this.deltaDirection * this.moveSpeed * (float)nDelta; this.deltaPosition += b; if (this.deltaPosition.sqrMagnitude >= this.movePosition.sqrMagnitude) { this.bMoveFlag = false; this.useSkillPosition = this.skillSlot.Actor.handle.myTransform.position + this.useOffsetPosition; this.effectPrefab.transform.position = this.useSkillPosition; } else { this.useSkillPosition = this.effectPrefab.transform.position + b; this.useSkillPosition += this.skillSlot.Actor.handle.myTransform.position - this.rootRosition; this.effectPrefab.transform.position = this.useSkillPosition; this.rootRosition = this.skillSlot.Actor.handle.myTransform.position; } } else { this.useSkillPosition += this.skillSlot.Actor.handle.myTransform.position - this.rootRosition; this.effectPrefab.transform.position = this.useSkillPosition; this.rootRosition = this.skillSlot.Actor.handle.myTransform.position; } if (this.bRotateFlag) { float num = this.rotateSpeed * (float)nDelta; this.deltaAngle += num; if (this.deltaAngle >= this.rotateAngle) { this.bRotateFlag = false; this.useSkillDirection = this.rotateDirection; this.effectPrefab.transform.forward = this.useSkillDirection; } else { Vector3 point = this.effectPrefab.transform.forward; if (Vector3.Cross(this.useSkillDirection, this.rotateDirection).y < 0f) { point = Quaternion.Euler(0f, -num, 0f) * point; } else { point = Quaternion.Euler(0f, num, 0f) * point; } this.useSkillDirection = point; this.effectPrefab.transform.forward = this.useSkillDirection; } } VInt ob = 0; if (PathfindingUtility.GetGroundY((VInt3)this.effectPrefab.transform.position, out ob)) { Vector3 position = this.effectPrefab.transform.position; position.y = (float)ob + 0.3f; this.effectPrefab.transform.position = position; } } if (this.effectWarnPrefab != null && this.effectPrefab != null) { this.effectWarnPrefab.transform.position = this.effectPrefab.transform.position; this.effectWarnPrefab.transform.forward = this.effectPrefab.transform.forward; } this.SetUseSkillTarget(); if (this.bSelectEffectPrefab && this.IsPrefabVisible(this.effectPrefab) && FogOfWar.enable) { VInt3 vInt = (VInt3)this.effectPrefab.transform.position; if (!PathfindingUtility.IsValidTarget(this.skillSlot.Actor.handle, vInt)) { this.PrefabSelecter = SkillControlIndicator.EEffectPrefabSelect.Block; } else if (Singleton <GameFowManager> .instance.QueryAttr(vInt) == FieldObj.EViewBlockType.Grass) { this.PrefabSelecter = SkillControlIndicator.EEffectPrefabSelect.Grass; } else if (SkillControlIndicator.CheckGrassAttaching(ref vInt)) { this.PrefabSelecter = SkillControlIndicator.EEffectPrefabSelect.Grass; } else { this.PrefabSelecter = SkillControlIndicator.EEffectPrefabSelect.Normal; } } }
private void HidePrefabEffect() { this.PrefabSelecter = SkillControlIndicator.EEffectPrefabSelect.Normal; this.HidePrefab(this.effectPrefab); }