コード例 #1
0
 /// <summary>
 /// проверка глаз и затылка
 /// </summary>
 private void checkEye()
 {
     if (Raycast(eyeRaycast, true, !BackEyepP()) && (Player.transform.position.y - this.transform.position.y) < heightFindPlayer)
     {
         SetFindOtherMobs();
         playerFinded = true;
         if (StateMobsGameObj.GetComponent <StateActive>().LastState != "Exc")
         {
             StateMobsGameObj.GetComponent <StateActive>().EndVoid(new List <bool> {
                 true, false, false
             });
             StateMobsGameObj.GetComponent <StateActive>().Exlamation();
         }
         else
         {
             StateMobsGameObj.GetComponent <StateActive>().EndVoid(new List <bool> {
                 true, true, false
             });
         }
     }
     else
     {
         StateMobsGameObj.GetComponent <StateActive>().RenameLastState();
     }
     if (Raycast(BackeyeRaycast, false, true) && BackEyepP())
     {
         if (Player.GetComponent <PlayerController>()._Movd)
         {
             Rotate();
         }
     }
 }
コード例 #2
0
 public void GetDamage(float damage)
 {
     if (Random.Range(0, 30) == 1)
     {
         PlayerStat.Instance.CountKritDamageUp();
         StatePosition();
         StateMobsGameObj.GetComponent <StateActive>().EndVoid(new List <bool> {
             true, true, true
         });
         StateMobsGameObj.GetComponent <StateActive>().Krit();
         Health -= damage * 0.3f;
     }
     else
     {
         Health -= damage;
     }
 }
コード例 #3
0
 private void checkState()
 {
     if (!Raycast(eyeRaycast, true, !BackEye()) && playerFinded)
     {
         if (StateMobsGameObj.GetComponent <StateActive>().LastState != "Que")
         {
             StateMobsGameObj.GetComponent <StateActive>().EndVoid(new List <bool> {
                 false, true, false
             });
             StateMobsGameObj.GetComponent <StateActive>().Questions();
         }
         else
         {
             StateMobsGameObj.GetComponent <StateActive>().EndVoid(new List <bool> {
                 true, true, false
             });
         }
     }
 }