//public Text score2; //public Text score3; //public Text score4; //public Text score5; private void Awake() { scoreValue = FindObjectOfType <PlayerStatistics>(); toCanvases = FindObjectOfType <MainMenuOptions>(); playerIsDead = FindObjectOfType <PlayerHealthManager>(); cameraD = FindObjectOfType <camera_control>(); playerD = FindObjectOfType <player_movement>(); managerD = FindObjectOfType <UiManager>(); sfxmanagerD = FindObjectOfType <SFXManager>(); }
// Use this for initialization void Start() { thePlayer = FindObjectOfType <player_movement>(); if (thePlayer.StartPoint == PointName) { thePlayer.transform.position = transform.position; StartDirection = new Vector2(0f, -1f); thePlayer.lastMove = StartDirection; theCamera = FindObjectOfType <camera_control>(); theCamera.transform.position = new Vector3(transform.position.x, transform.position.y, theCamera.transform.position.z); } }
// Use this for initialization void Start() { bounds = GetComponent <BoxCollider2D>(); theCamera = FindObjectOfType <camera_control>(); theCamera.SetBounds(bounds); }