void Start() { instance = this; tpCamera = FindObjectOfType <vCamera.vThirdPersonCamera>(); currentAimCanvas = aimCanvasCollection[0]; isValid = true; }
public virtual void Init(vThirdPersonController cc) { instance = this; this.cc = cc; currentAimCanvas = aimCanvasCollection[0]; isValid = true; }
/// <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; } } }