// Token: 0x0600004A RID: 74 RVA: 0x00005758 File Offset: 0x00003958
        public ePAnimationChain Clone(ePart eeP)
        {
            ePAnimationChain C = new ePAnimationChain();


            foreach (ePAnimation eA in this.AnimationList)
            {
                ePAnimation NeweA = eA.Clone(eeP);
                NeweA.ePAnimationChain1     = this;
                NeweA.Axis.Owner_ePart      = eeP;
                NeweA.ChildRotationGradient = eA.ChildRotationGradient;


                foreach (ePAnimation PeA in NeweA.Parellel_eAs)
                {
                    PeA.ePAnimationChain1 = this;
                    PeA.Axis.Owner_ePart  = eeP;
                }


                C.AnimationList.Add(NeweA);
            }


            C.Loopable          = this.Loopable;
            C.iCurrentAnimation = 0;
            C.CurrentAnimation  = C.AnimationList[0];
            return(C);
        }
Пример #2
0
 // Token: 0x06000053 RID: 83 RVA: 0x00006044 File Offset: 0x00004244
 public ePAnimation(ePart eeP, Vector3 DDPos, float[] DDAngles, bool LLooping, float[] TTimes, Axis AAxis, float ChildRotationGradient)
 {
     this.CAngle             = 0f;
     this.Time               = 0.04f;
     this.GotTrack           = false;
     this.DAngleLst          = new List <float>();
     this.TimeLst            = new List <float>();
     this.CDAngleI           = 0;
     this.Looping            = false;
     this.IsRefiningEdges    = false;
     this.GetingTargetLstDir = false;
     this.Parellel_eAs       = new List <ePAnimation>();
     this.IsFakeTimer        = false;
     this.Playing            = false;
     this.CAngle             = 0f;
     this.CDAngleI           = 0;
     this.eP   = eeP;
     this.DPos = DDPos;
     this.ChildRotationGradient = ChildRotationGradient;
     foreach (float DDAngle in DDAngles)
     {
         this.DAngleLst.Add(DDAngle);
     }
     this.DAngle  = this.DAngleLst[0];
     this.Looping = LLooping;
     foreach (float TTime in TTimes)
     {
         this.TimeLst.Add(TTime);
     }
     this.Time = this.TimeLst[0];
     this.Axis = AAxis;
     this.eP.CurrentAnimations.Add(this);
     this.Speed = this.DAngle / this.Time;
 }
Пример #3
0
 /// <summary>
 /// Bounding Fustrum node
 /// </summary>
 // Token: 0x06000062 RID: 98 RVA: 0x00006B80 File Offset: 0x00004D80
 public eCollitionNode(Matrix M, ePart eP)
 {
     this.LowerNodes        = new List <eCollitionNode>();
     this.RRewardMultiplier = new RewardSetMultiplier(1f, 1f, 1f);
     this.Type1             = eCollitionNode.Type.BoundingFrustum;
     this.BF = new BoundingFrustum(M);
     this.eP = eP;
 }
Пример #4
0
 // Token: 0x06000060 RID: 96 RVA: 0x00006ABC File Offset: 0x00004CBC
 public eCollitionNode(Vector3 Min, Vector3 Max, ePart eP)
 {
     this.LowerNodes        = new List <eCollitionNode>();
     this.RRewardMultiplier = new RewardSetMultiplier(1f, 1f, 1f);
     this.Type1             = eCollitionNode.Type.BoundingBox;
     this.BB = new BoundingBox(Min, Max);
     this.RealativePosMax = Max;
     this.RealativePosMin = Min;
     this.eP = eP;
 }
Пример #5
0
 // Token: 0x0600005F RID: 95 RVA: 0x00006A58 File Offset: 0x00004C58
 public eCollitionNode(Vector3 RealativePos, float R, ePart eP)
 {
     this.LowerNodes        = new List <eCollitionNode>();
     this.RRewardMultiplier = new RewardSetMultiplier(1f, 1f, 1f);
     this.Type1             = eCollitionNode.Type.BoundingSphere;
     this.BS           = new BoundingSphere(RealativePos, R);
     this.RealativePos = RealativePos;
     this.BSR          = R;
     this.eP           = eP;
 }
Пример #6
0
        // Token: 0x0600013F RID: 319 RVA: 0x000129A4 File Offset: 0x00010BA4
        public void StartWalking()
        {
            this.WalkingAnimation   = new ePAnimationChain();
            this.FakeWA             = new ePAnimation();
            this.WalkingAnimationL  = new ePAnimation();
            this.WalkingAnimationR  = new ePAnimation();
            this.WalkingAnimationHL = new ePAnimation();
            this.WalkingAnimationHR = new ePAnimation();
            ePart FakeBodyPart = new ePart(this);

            this.FakeWA = new ePAnimation(FakeBodyPart, default, new float[]
Пример #7
0
 // Token: 0x06000063 RID: 99 RVA: 0x00006BD4 File Offset: 0x00004DD4
 public eCollitionNode(Vector3 P1, Vector3 P2, Vector3 P3, ePart eP)
 {
     this.LowerNodes        = new List <eCollitionNode>();
     this.RRewardMultiplier = new RewardSetMultiplier(1f, 1f, 1f);
     this.Type1             = eCollitionNode.Type.Plane;
     this.PL  = new Plane(P1, P2, P3);
     this.RP1 = P1;
     this.RP2 = P2;
     this.RP3 = P3;
     this.eP  = eP;
 }
Пример #8
0
        // Token: 0x06000206 RID: 518 RVA: 0x0001C38C File Offset: 0x0001A58C
        public static void InitializeAnimations()
        {
            ePart   eeP   = new ePart(new Entity(EntityTypes.Human1));
            Vector3 ddpos = default;

            float[] array = new float[2];
            array[0] = -2f;
            ePAnimation FeA = new ePAnimation(eeP, ddpos, array, false, new float[]
            {
                15f,
                10f
            }, new Axis("L".ToCharArray().First <char>(), false, new ePart(new Entity(EntityTypes.Human1))), 1.05f)
            {
                IsFakeTimer = true
            };
            ePAnimation eA = new ePAnimation(new ePart(new Entity(EntityTypes.Human1)), default, new float[]
Пример #9
0
        // Token: 0x06000056 RID: 86 RVA: 0x0000621C File Offset: 0x0000441C
        public ePAnimation Clone(ePart eeP)
        {
            bool        isFakeTimer = this.IsFakeTimer;
            ePAnimation o;

            if (isFakeTimer)
            {
                o = new ePAnimation(new ePart(new Entity(EntityTypes.WayPoint)), this.DPos, this.DAngleLst.ToArray(), this.Looping, this.TimeLst.ToArray(), this.Axis);
            }
            else
            {
                o = new ePAnimation(eeP, this.DPos, this.DAngleLst.ToArray(), this.Looping, this.TimeLst.ToArray(), this.Axis);
            }
            foreach (ePAnimation Ani in this.Parellel_eAs)
            {
                ePAnimation ClA = Ani.Clone(eeP);
                ClA.ChildRotationGradient = Ani.ChildRotationGradient;
                o.Parellel_eAs.Add(ClA);
            }
            return(o);
        }
Пример #10
0
        // Token: 0x060001D2 RID: 466 RVA: 0x000182D4 File Offset: 0x000164D4
        public void DrawMan()
        {
            ePart BPRHand = this.BodyParts[6];

            BPRHand.OriginalRotation = this.ModelRotationY * Matrix.CreateFromAxisAngle(this.ModelRotationY.Left, this.InsiderHandXRotation - 0.7853982f);
            BPRHand.Rotation        *= Matrix.CreateFromAxisAngle(this.ModelRotation.Left, this.InsiderHandXCurrRotation);
            ePart BPLHand = this.BodyParts[1];

            BPLHand.OriginalRotation      = this.ModelRotationY;
            this.InsiderHandXCurrRotation = 0f;
            bool flag = this.CamPosType == RacingCameraAngle.Back;

            checked
            {
                if (flag)
                {
                    int i = 0;

                    foreach (ModelMesh mesh in this.eType.Model.Meshes)
                    {
                        ePart BP = this.BodyParts[i];

                        foreach (Effect effect6 in mesh.Effects)
                        {
                            BasicEffect effect = (BasicEffect)effect6;
                            effect.AmbientLightColor = new Vector3((float)((double)BP.Hurt / 25.0), 0f, 0f);
                            effect.Projection        = Main.projectionMatrix;
                            effect.View  = Main.viewMatrix;
                            effect.World = Matrix.Multiply(Matrix.Multiply(this.eType.Transforms, this.BodyParts[i].Rotation), Matrix.CreateTranslation(this.BodyParts[i].RelativePosition + this.Position));
                        }

                        mesh.Draw();
                        i++;
                    }

                    bool flag2 = !Information.IsNothing(this.CTool);
                    if (flag2)
                    {
                        int b = 0;


                        foreach (ModelMesh mesh2 in this.CTool.Model.Meshes)
                        {
                            foreach (Effect effect7 in mesh2.Effects)
                            {
                                BasicEffect effect2 = (BasicEffect)effect7;
                                effect2.Projection = Main.projectionMatrix;
                                effect2.View       = Main.viewMatrix;
                                Matrix MeshTransform = this.CTool.Rotation * Matrix.CreateTranslation(this.CTool.RelativePosition + this.Position);
                                effect2.World = this.CTool.Transforms[mesh2.ParentBone.Index] * MeshTransform;
                            }
                            mesh2.Draw();
                            b++;
                        }
                    }
                }

                else
                {
                    bool flag3 = this.CamPosType == RacingCameraAngle.Inside;
                    if (flag3)
                    {
                        ModelMesh meshRHand = this.eType.Model.Meshes[6];


                        foreach (Effect effect8 in meshRHand.Effects)
                        {
                            BasicEffect effect3 = (BasicEffect)effect8;
                            effect3.AmbientLightColor = new Vector3((float)((double)BPRHand.Hurt / 25.0), 0f, 0f);
                            effect3.Projection        = Main.projectionMatrix;
                            effect3.View  = Main.viewMatrix;
                            effect3.World = this.eType.Transforms * BPRHand.Rotation * Matrix.CreateTranslation(BPRHand.RelativePosition + this.Position);
                        }


                        meshRHand.Draw();
                        ModelMesh meshLHand = this.eType.Model.Meshes[1];


                        foreach (Effect effect9 in meshLHand.Effects)
                        {
                            BasicEffect effect4 = (BasicEffect)effect9;
                            effect4.AmbientLightColor = new Vector3((float)((double)BPLHand.Hurt / 25.0), 0f, 0f);
                            effect4.Projection        = Main.projectionMatrix;
                            effect4.View  = Main.viewMatrix;
                            effect4.World = this.eType.Transforms * BPLHand.Rotation * Matrix.CreateTranslation(BPLHand.RelativePosition + this.Position);
                        }


                        meshLHand.Draw();
                        bool flag4 = !Information.IsNothing(this.CTool);
                        if (flag4)
                        {
                            int b2 = 0;


                            foreach (ModelMesh meshC in this.CTool.Model.Meshes)
                            {
                                foreach (Effect effect10 in meshC.Effects)
                                {
                                    BasicEffect effect5 = (BasicEffect)effect10;
                                    effect5.Projection = Main.projectionMatrix;
                                    effect5.View       = Main.viewMatrix;
                                    Matrix MeshTransform2 = this.CTool.Rotation * Matrix.CreateTranslation(this.CTool.RelativePosition + this.Position);
                                    effect5.World = this.CTool.Transforms[meshC.ParentBone.Index] * MeshTransform2;
                                }


                                meshC.Draw();
                                b2++;
                            }
                        }
                    }
                }

                foreach (ePart BP2 in this.BodyParts)
                {
                    BP2.Hurten(-1f);
                }
            }
        }
Пример #11
0
 /// <summary>
 /// Ray node
 /// </summary>
 // Token: 0x06000061 RID: 97 RVA: 0x00006B20 File Offset: 0x00004D20
 public eCollitionNode(Vector3 Start, Vector3 Direction, bool KeepThisTrueForRays, ePart eP)
 {
     this.LowerNodes        = new List <eCollitionNode>();
     this.RRewardMultiplier = new RewardSetMultiplier(1f, 1f, 1f);
     this.Type1             = eCollitionNode.Type.Ray;
     this.RR           = new Ray(Start, Direction);
     this.RealativePos = Start;
     this.eP           = eP;
 }