コード例 #1
0
 // Token: 0x060038A0 RID: 14496 RVA: 0x00101414 File Offset: 0x000FF614
 public void Setup(ConfigDataFlyObjectInfo flyObjInfo, CombatSkillState ss, CombatActor sourceActor, CombatActor targetActor)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetupConfigDataFlyObjectInfoCombatSkillStateCombatActorCombatActor_hotfix != null)
     {
         this.m_SetupConfigDataFlyObjectInfoCombatSkillStateCombatActorCombatActor_hotfix.call(new object[]
         {
             this,
             flyObjInfo,
             ss,
             sourceActor,
             targetActor
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (flyObjInfo == null || ss == null || sourceActor == null || targetActor == null)
     {
         base.DeleteMe();
         return;
     }
     this.m_configDataFlyObjectInfo = flyObjInfo;
     this.m_sourceSkillState        = ss;
     this.m_sourceActor             = sourceActor;
     this.m_targetActor             = targetActor;
     this.m_targetTeamNumber        = targetActor.TeamNumber;
     this.m_startPosition           = sourceActor.Position;
     this.m_startZ = sourceActor.Height * 2 / 3 + sourceActor.FootHeight;
     if (flyObjInfo.TrackType == TrackType.TrackType_Parabolic)
     {
         Vector2i vector2i = targetActor.Position - sourceActor.Position;
         int      num      = Math.Max((int)((long)vector2i.magnitude), 1);
         int      num2     = Combat.MillisecondToFrame1(num * 1000 / flyObjInfo.Speed);
         this.m_endZ = targetActor.Height * 2 / 3 + targetActor.FootHeight;
         Fix64 fix  = (Fix64)((long)(-(long)this.m_configDataFlyObjectInfo.Gravity));
         Fix64 fix2 = (Fix64)((long)num) / (Fix64)((long)flyObjInfo.Speed);
         Fix64 fix3 = this.m_vz = Fix64.Zero;
         if (fix2 > Fix64.Zero)
         {
             fix3 = (this.m_vz = (Fix64)((long)(this.m_endZ - this.m_startZ)) / fix2 - fix * fix2 * (Fix64)0.5f);
         }
         Fix64 x = MathUtility.Max(fix3 * fix3 - (Fix64)((long)(2 * this.m_startZ)) * fix, Fix64.Zero);
         Fix64 x2;
         if (fix < Fix64.Zero)
         {
             x2 = (-fix3 - Fix64.Sqrt(x)) / fix;
         }
         else
         {
             x2 = fix2;
         }
         this.m_lifeMax = Combat.MillisecondToFrame1((int)((long)(x2 * (Fix64)1000L)));
         int num3 = num * this.m_lifeMax / num2;
         this.m_endPosition = this.m_startPosition + vector2i.normalized * (Fix64)((long)num3);
         this.m_endZ        = 0;
     }
     else
     {
         int num4 = flyObjInfo.Distance;
         if (num4 <= 0)
         {
             num4 = 1000;
         }
         if (flyObjInfo.TrackType == TrackType.TrackType_Straight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = this.m_startZ;
         }
         else if (flyObjInfo.TrackType == TrackType.TrackType_DownStraight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = (this.m_startZ = 80);
         }
         else if (flyObjInfo.TrackType == TrackType.TrackType_UpStraight)
         {
             this.m_endPosition.x = this.m_startPosition.x + (Fix64)((long)(Fix64.Sign(targetActor.Position.x - sourceActor.Position.x) * num4));
             this.m_endPosition.y = this.m_startPosition.y;
             this.m_endZ          = (this.m_startZ = 150);
         }
         this.m_lifeMax = Combat.MillisecondToFrame1(num4 * 1000 / flyObjInfo.Speed);
     }
     this.m_frameCount         = 0;
     this.m_life               = 0;
     this.m_fxLife             = Fix64.Zero;
     this.m_isGraphicSkillFade = false;
     this.m_hitId              = this.Combat.GetNextHitId();
     this.CreateFx(flyObjInfo.Model, (float)flyObjInfo.ModelScale * 0.01f);
 }
コード例 #2
0
 // Token: 0x060037A3 RID: 14243 RVA: 0x000FAD18 File Offset: 0x000F8F18
 public LuaExportHelper(Combat owner)
 {
     this.m_owner = owner;
 }