Example #1
0
 private void ApplyYawDelta(float yRotation)
 {
     if (yRotation != 0f)
     {
         this.currentYaw = Mathf.DeltaAngle(0f, this.currentYaw.Degrees + yRotation);
     }
 }
Example #2
0
 private void BindCharacter()
 {
     Character character = (Character)base.idMain;
     character.origin = this.tr.position;
     float single = Mathf.DeltaAngle(this.previousYaw.Degrees, this.currentYaw.Degrees);
     if (single != 0f)
     {
         this.previousYaw = this.currentYaw;
         Character character1 = character;
         character1.eyesYaw = character1.eyesYaw + single;
     }
 }
Example #3
0
 public void InitializeSetup(Character character, CCTotemPole cc, CharacterCCMotorTrait trait)
 {
     this.tr = base.transform;
     this.cc = cc;
     base.idMain = character;
     CCMotor.YawAngle yawAngle = 0f;
     CCMotor.YawAngle yawAngle1 = yawAngle;
     this.previousYaw = yawAngle;
     this.currentYaw = yawAngle1;
     if (trait)
     {
         if (trait.settings)
         {
             this.settings = trait.settings;
         }
         this.canControl = trait.canControl;
         this.sendLandMessage = trait.sendLandMessage;
         this.sendJumpMessage = trait.sendJumpMessage;
         this.sendJumpFailureMessage = trait.sendJumpFailureMessage;
         this.sendFallMessage = trait.sendFallMessage;
         this.sendExternalVelocityMessage = trait.sendExternalVelocityMessage;
         this.stepMode = trait.stepMode;
         this.minTimeBetweenJumps = trait.minTimeBetweenJumps;
     }
     if (!this._installed && cc)
     {
         this._installed = true;
         CCMotor.Callbacks.InstallCallbacks(this, cc);
     }
 }