private void Start() { playerIdentifierComponent = ComponentLocator.instance.GetDependency <PlayerIdentifierComponent>(); playerDistanceToCameraCenter = transform.position - playerIdentifierComponent.playerGameObject.transform.position; aISpawnComponent = ComponentLocator.instance.GetDependency <AISpawnComponent>(); timeScalesComponent = ComponentLocator.instance.GetDependency <TimeScalesComponent>(); }
// Use this for initialization void Start() { gameObject.SetActive(false); ComponentLocator.instance.GetDependency <PlayerIdentifierComponent>().playerGameObject.GetComponent <HealthComponent>().dieEvent += GameOver; playerScoreComponent = ComponentLocator.instance.GetDependency <PlayerScoreComponent>(); ComponentLocator.instance.GetDependency <PlayerIdentifierComponent>().GetComponent <PlayerReviveComponent>().playerRevivedEvent += playerRevived; aISpawnComponent = ComponentLocator.instance.GetDependency <AISpawnComponent>(); }
private void Start() { aISpawnComponent = ComponentLocator.instance.GetDependency <AISpawnComponent>(); }