コード例 #1
0
 void Start()
 {
     instance         = this;
     tpCamera         = FindObjectOfType <vCamera.vThirdPersonCamera>();
     currentAimCanvas = aimCanvasCollection[0];
     isValid          = true;
 }
コード例 #2
0
 public virtual void Init(vThirdPersonController cc)
 {
     instance         = this;
     this.cc          = cc;
     currentAimCanvas = aimCanvasCollection[0];
     isValid          = true;
 }
コード例 #3
0
 /// <summary>
 /// Set AimCanvas ID
 /// if id do not exist,this change to defaultAimCanvas id 0
 /// </summary>
 /// <param name="id">index of AimCanvasCollection</param>
 public void SetAimCanvasID(int id)
 {
     if (aimCanvasCollection.Count > 0 && currentCanvasID != id)
     {
         if (currentAimCanvas != null)
         {
             currentAimCanvas.DisableAll();
         }
         if (id < aimCanvasCollection.Count)
         {
             currentAimCanvas = aimCanvasCollection[id];
             currentCanvasID  = id;
         }
         else
         {
             currentAimCanvas = aimCanvasCollection[0];
             currentCanvasID  = 0;
         }
     }
 }