void Start() { //prepare GUI data (originally from FPS counter shown in class, changed for my own usage) int w = Screen.width, h = Screen.height; rect = new Rect(0, 0, w, h * 2 / 100); style = new GUIStyle(); style.fontSize = h * 4 / 100; style.normal.textColor = Color.white; //get players to follow their scores playerScript = GameObject.FindWithTag("Player").GetComponent <PlayerControls>(); enemyScript = GameObject.FindWithTag("Enemy").GetComponent <EnemyBehavior>(); }
// Start is called before the first frame update void Start() { zeroVector = Vector3.zero; pilot = this.transform.parent.GetComponent <AnyPlayerBehavior>(); }