Пример #1
0
 private void OnDeserialized()
 {
     if (!this.collFlags)
     {
         this.collFlags          = base.gameObject.AddComponent <RigidBodyCollisionFlags>();
         this.collFlags.coll     = this.capsule;
         this.collFlags.collType = 1;
         this.collFlags.cColl    = base.transform.GetComponent <CapsuleCollider>();
     }
 }
Пример #2
0
 private void Awake()
 {
     this.buoyancy              = base.GetComponent <Buoyancy>();
     this.rb                    = base.GetComponent <Rigidbody>();
     this.playerPhysicMaterial  = base.GetComponent <CapsuleCollider>().material;
     this.playerPhysicMaterial2 = base.GetComponent <SphereCollider>().material;
     this.rb.freezeRotation     = true;
     this.rb.useGravity         = false;
     this.collFlags             = base.transform.GetComponent <RigidBodyCollisionFlags>();
     this.setup                 = base.GetComponentInChildren <playerScriptSetup>();
     this.targets               = base.GetComponentInChildren <playerTargetFunctions>();
     this.UnLockView();
     this.capsule             = (base.GetComponent <Collider>() as CapsuleCollider);
     this.defaultMass         = this.rb.mass;
     this.originalHeight      = this.capsule.height;
     this.originalYPos        = this.capsule.center.y;
     this.crouchCapsuleCenter = (this.crouchHeight - this.originalHeight) / 2f;
     this.Grounded            = true;
     this.fsmCrouchBool       = FsmVariables.GlobalVariables.GetFsmBool("playerCrouchBool");
 }