protected void Awake() { isOnCamera = GetComponent <IsOnCamera>(); body = GetComponent <Rigidbody>(); animator = gameObject.GetComponent <Animator>(); collider = GetComponent <Collider>(); readyToMove = isMoving; }
/// <summary> /// Add target to camera /// </summary> public void AddTarget(IsOnCamera other) { // Check object is not already a target if (targetList.IndexOf(other) < 0) { freezeCamera = false; targetList.Add(other); } }
/// <summary> /// Remove target from target list /// </summary> public void RemoveTarget(IsOnCamera other) { for (int i = 0; i < targetList.Count; i++) { if (targetList[i].GetInstanceID() == other.GetInstanceID()) { targetList.RemoveAt(i); return; } } }
protected void Awake() { bodyBullet = GetComponent <Rigidbody>(); isOnCamera = GetComponent <IsOnCamera>(); }
private void Awake() { isOnCamera = GetComponent <IsOnCamera>(); }