private SpaceRoaches InitializeCamera() { GameObject mainCamera = SRResources.Core.Base.BaseCamera.Instantiate(); mainCamera.name = "mainCamera"; mainCamera.transform.parent = this.gameObject.transform; _smoothFollow = mainCamera.AddComponent <Smooth_Follow>(); _mainCamera = mainCamera.GetComponent <Camera>(); mainCamera.AddComponent <Shake_Camera>(); return(this); }
// Use this for initialization void Start() { _smoothFollow = GetComponent <Smooth_Follow>(); }