// Use this for initialization void Start() { _pmgm = FindObjectOfType <PuckMasterGameManager>(); _player1 = _pmgm.GetPlayerWithTag("Player1"); _player2 = _pmgm.GetPlayerWithTag("Player2"); RegisterPucksWithUI(_player1, Player1Pucks); RegisterPucksWithUI(_player2, Player2Pucks); Player1Avatar.RegisterPlayer(_player1); Player2Avatar.RegisterPlayer(_player2); }
/* * Lifecycle */ protected void Awake() { pucks = GetComponentsInChildren <PointAndShoot>(); aimChevron = GetComponentInChildren <AimChevron>(); pmgm = FindObjectOfType <PuckMasterGameManager>(); powerIndicator = GetComponentInChildren <PowerIndicator>(); foreach (var da in FindObjectsOfType <DeploymentArea>()) { if (this.tag.Equals(da.tag)) { deploymentArea = da; } } }