void Start() { _playerStatesScript = GetComponent <PlayerStates_script>(); _armPivot = transform.GetChild(1); _bulletExit = _armPivot.GetChild(1).GetChild(0); _effectsManager = GameController.GetComponent <EffectsManager_script>(); _bullets = new List <GameObject>(); }
void Awake() { _reactionFill = transform.GetChild(1).GetChild(1).GetChild(1).GetComponent <Image>(); _aimTimeFilll = transform.GetChild(1).GetChild(3).GetChild(1).GetComponent <Image>(); _skillFill = transform.GetChild(1).GetChild(5).GetChild(1).GetComponent <Image>(); _bountyText = transform.GetChild(1).GetChild(6).GetComponent <TextMeshProUGUI>(); _opponentsCreatorScript = transform.parent.parent.GetComponent <OpponentsCreator_script>(); _headImage = transform.GetChild(0).GetChild(2).GetComponent <Image>(); _torsoImage = transform.GetChild(0).GetChild(1).GetComponent <Image>(); _armImage = transform.GetChild(0).GetChild(3).GetComponent <Image>(); _effectsManager = _opponentsCreatorScript.GameController.GetComponent <EffectsManager_script>(); _selectButton = transform.GetComponentInChildren <Button>(); _selectButton.onClick.AddListener(() => Select()); _bulletText = transform.GetChild(1).GetChild(7).GetComponent <TextMeshProUGUI>(); }
void Start() { _playerStatesScript = FindObjectOfType <PlayerStates_script>(); _armPivot = this.transform.GetChild(1); _bulletExit = _armPivot.GetChild(1).GetChild(0); _headRend = transform.GetChild(0).GetChild(1).GetComponent <SpriteRenderer>(); _torsoRend = transform.GetChild(0).GetComponent <SpriteRenderer>(); _legsRend = transform.GetChild(0).GetChild(0).GetComponent <SpriteRenderer>(); _armRend = _armPivot.GetChild(0).GetComponent <SpriteRenderer>(); _effectsManager = GameController.GetComponent <EffectsManager_script>(); _bullets = new List <GameObject>(); AllowShoot = false; RandomPos(); //Invoke("Aim",ReactionTime); }