コード例 #1
0
 void Awake()
 {
     if (this.characterController == null)
     {
         this.characterController = this.GetComponent <CompleteCharacterController>();
     }
     if (this.guardian == null)
     {
         this.guardian = this.GetComponent <Guardian>();
     }
 }
コード例 #2
0
 // Use this for initialization
 void Awake()
 {
     if (this.characterController == null)
     {
         this.characterController = GetComponent <CompleteCharacterController>();
     }
     if (this.characterInput == null)
     {
         this.characterInput = GetComponent <CharacterInputDetector>();
     }
     if (this.cameraController == null)
     {
         this.cameraController = GetComponent <CameraController>();
     }
     if (this.cameraInput == null)
     {
         this.cameraInput = GetComponent <CameraInputDetector>();
     }
     Cursor.lockState = CursorLockMode.Locked;
     Cursor.visible   = false;
 }