// Start is called before the first frame update void Start() { SwitchToBattleshipCamera(); _target = playerBoat.transform.Find("Target").gameObject; _guns = playerBoat.GetComponent <GunController>().guns; _follower = ShellFollowingCamera.GetComponent <ShellFollower>(); AimingCamera.transform.position = _guns[_gunIndex].gun.transform.position + new Vector3(0, 5, 0); //AimingCamera.transform.SetParent(_guns[gunIndex].gun.transform); }
// Start is called before the first frame update public void Start() { loadingTime = Settings.PlayerLoadingTime; Debug.Log("loading time !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! = " + loadingTime); _follower = ShellCamera.GetComponent <ShellFollower>(); _healthManager = transform.GetComponent <HealthManager>(); _target = transform.Find("Target").gameObject; _instantiateOffset = new Vector3(0, -0.5f, 0); _loadingTimeLeft = loadingTime; _fireSound = GetComponent <AudioSource>(); for (int i = 0; i < guns.Length; i++) { guns[i].cannon = guns[i].gun.transform.GetChild(0).gameObject; guns[i].loaded = true; } }