Example #1
0
 public void UpdateCall(int ptnNo)
 {
     if (ptnNo >= this.neckTypeStates.Length)
     {
         ptnNo = 0;
     }
     if (this.lookType != this.neckTypeStates[ptnNo].lookType)
     {
         this.lookType        = this.neckTypeStates[ptnNo].lookType;
         this.changeTypeTimer = 0.0f;
         for (int index = 0; index < this.aBones.Length; ++index)
         {
             this.aBones[index].fixAngleBackup = this.aBones[index].fixAngle;
         }
         if (this.lookType == NECK_LOOK_TYPE_VER2.FORWARD)
         {
             for (int index = 0; index < this.aBones.Length; ++index)
             {
                 this.aBones[index].angleH = 0.0f;
                 this.aBones[index].angleV = 0.0f;
             }
         }
     }
     if (this.lookType != NECK_LOOK_TYPE_VER2.TARGET)
     {
         return;
     }
     for (int index = 0; index < this.aBones.Length; ++index)
     {
         this.aBones[index].backupLocalRotaionByTarget = this.aBones[index].neckBone.get_localRotation();
         this.aBones[index].neckBone.set_localRotation(this.aBones[index].fixAngle);
     }
 }
Example #2
0
 public static void SetNeckLook(this ChaControl chara, NECK_LOOK_TYPE_VER2 necktype)
 {
     for(int i = 0; i < chara.neckLookCtrl.neckLookScript.neckTypeStates.Length; i++)
     {
         if(chara.neckLookCtrl.neckLookScript.neckTypeStates[i].lookType == necktype)
             chara.neckLookCtrl.ptnNo = i;
     }
 }
Example #3
0
 private void Backup(ChaInfo body)
 {
     lastFOV      = Camera.main.fieldOfView;
     lastNearClip = Camera.main.nearClipPlane;
     lastRotation = Camera.main.transform.rotation;
     lastPosition = Camera.main.transform.position;
     lastDOF      = DepthOfField;
     hideObstacle = Shield;
     lastNeck     = GetNeckLook(body);
 }
Example #4
0
 private void SetNeckLook(NECK_LOOK_TYPE_VER2 necktype)
 {
     for (int i = 0; i < currentBody.neckLookCtrl.neckLookScript.neckTypeStates.Length; i++)
     {
         if (currentBody.neckLookCtrl.neckLookScript.neckTypeStates[i].lookType == necktype)
         {
             currentBody.neckLookCtrl.ptnNo = i;
             return;
         }
     }
 }
Example #5
0
 public void Init()
 {
     foreach (NeckObjectVer2 aBone in this.aBones)
     {
         if (Object.op_Equality((Object)aBone.referenceCalc, (Object)null))
         {
             aBone.referenceCalc = ((Component)this).get_transform();
         }
         aBone.angleH     = 0.0f;
         aBone.angleV     = 0.0f;
         aBone.angleHRate = 0.0f;
         aBone.angleVRate = 0.0f;
     }
     this.lookType = NECK_LOOK_TYPE_VER2.ANIMATION;
     this.initEnd  = true;
 }
Example #6
0
        private void Apply(ChaControl chara)
        {
            currentChara = chara;

            backupFov      = Camera.main.fieldOfView;
            backupNearClip = Camera.main.nearClipPlane;
            backupRot      = Camera.main.transform.rotation;
            backupPos      = Camera.main.transform.position;
            backupDOF      = DepthOfField;
            backupShield   = Shield;
            backupNeck     = currentChara.GetNeckLook();

            FindBones();
            angle = Vector2.zero;
            rot   = Vector3.zero;

            CameraEnabled = false;
            povActive     = true;
        }