void Awake() { scoreObj = new Score(scoreText); objectPooller = ObjectPooler.Instance; characterController = gameObject.GetComponentInParent <CharacterController>(); paerentTransform = gameObject.GetComponentInParent <Transform>(); gameMaster = GameMaster.GM; CurrentHealth = 20; MaxHealth = 20; gk = GlobalsKeeper.GK; }
void Awake() { if (GK != null) { GameObject.Destroy(GK); } else { GK = this; } }
void Start() { scoreText = GetComponent <Text>(); gk = GlobalsKeeper.GK; scoreText.text = gk.playerScore.ToString(); }