Пример #1
0
 public SkillSlot(SkillSlotType type)
 {
     this.SkillStatistictInfo = new SKILLSTATISTICTINFO();
     this.IsCDReady           = true;
     this.SlotType            = type;
     this.bLimitUse           = false;
     this.skillChangeEvent    = new SkillChangeEvent(this);
     this.skillIndicator      = new SkillControlIndicator(this);
     this.changeSkillCDRate   = 0;
     this.lLastUseTime        = 0L;
     this.CurSkillCD          = 0;
 }
Пример #2
0
 public SkillSlot(SkillSlotType type)
 {
     this.IsCDReady         = true;
     this.SlotType          = type;
     this.bLimitUse         = false;
     this.skillChangeEvent  = new SkillChangeEvent(this);
     this.skillIndicator    = new SkillControlIndicator(this);
     this.changeSkillCDRate = 0;
     this.lLastUseTime      = 0L;
     this.CurSkillCD        = 0;
     this.skillUseCount     = 0;
     this.keyPressTime      = 0f;
 }
Пример #3
0
 public SkillSlot(SkillSlotType type)
 {
     this.IsCDReady          = true;
     this.SlotType           = type;
     this.bLimitUse          = false;
     this.skillChangeEvent   = new SkillChangeEvent(this);
     this.skillIndicator     = new SkillControlIndicator(this);
     this.skillBean          = new SkillBean(this);
     this.changeSkillCDRate  = 0;
     this.lLastUseTime       = 0L;
     this.CurSkillCD         = 0;
     this.skillUseCount      = 0u;
     this.keyPressTime       = 0f;
     this.skillTargetId      = 0u;
     this.NextSkillTargetIDs = new ListValueView <uint>();
 }
Пример #4
0
 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;
         }
     }
 }