コード例 #1
0
 //--------------------------------------------------------------------------------------------/
 // Methods
 //--------------------------------------------------------------------------------------------/
 private void CheckForPlayerController()
 {
     playerController = gameObject.GetComponent <StratusPlayerController>();
     if (playerController)
     {
         this.hideFlags = HideFlags.HideInInspector;
         playerController.Add(this);
     }
     else
     {
         Trace.Script("Player controller not found");
         this.hideFlags = HideFlags.None;
     }
 }
コード例 #2
0
 //--------------------------------------------------------------------------------------------/
 // Messages
 //--------------------------------------------------------------------------------------------/
 private void Awake()
 {
     playerController = gameObject.GetComponent <StratusPlayerController>();
     OnAwake();
 }