// Use this for initialization void Start() { Instance = this; //transform.position = Vector3.left * (sprite.bounds.size.x / 2 - gameObject.GetComponent<Camera>().orthographicSize * (float)Screen.width / Screen.height); startCameraPos = new Vector3(sprite.bounds.size.x * -1 / 2 + sizeOfCamera, transform.position.y, -10f); endCameraPos = new Vector3(sprite.bounds.size.x / 2 - sizeOfCamera, transform.position.y, -10f); transform.position = startCameraPos; foreach (Transform child in transform) { Debug.Log(child.name); child.position = new Vector3(transform.position.x + sizeOfCamera, 0, -10); } }
private void Start() { naviCanvas = FrontSceneManager.naviCanvas; fadeCanvas = GameManager.fadeCanvas; Transform cameraParent = Camera.main.transform.parent.parent; cameraAnimator = cameraParent.GetComponent <Animator>(); nanamiAnimator = FrontSceneManager.enemy.GetComponent <Animator>(); playerAnimator = FrontSceneManager.player.GetComponent <Animator>(); cameraAnimator.enabled = false; moving = cameraParent.GetComponent <CameraMoving>(); protect = cameraParent.GetComponent <ProtectFromWall>(); pointLight = GetComponentInChildren <Light>(true); particle = GetComponentInChildren <ParticleSystem>(true); audioSource = GetComponentInChildren <AudioSource>(true); }
internal void SendCameraMoving(CameraPosition position) { CameraMoving?.Invoke(this, new CameraMovingEventArgs(position)); }
// Use this for initialization void Start() { //Debug.Log(transform.rotation.ToString()); CameraMoving.Instance = this; crystal.SetActive(false); }
internal void cameraMoving() { CameraMoving?.Invoke(this, new EventArgs()); }