protected virtual void Start() { MyRigidBody2D = gameObject.GetComponent <Rigidbody2D>(); MyAnimator = gameObject.GetComponent <Animator>(); StartPosition = transform.position; PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>(); }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag(PlayerTag)) { ThorStats PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>(); PlayerStats.TakeDamage(Damage); } Destroy(gameObject); }
private void Start() { PlayerStats = GameObject.FindGameObjectWithTag(PlayerTag).GetComponent <ThorStats>(); }
private void Start() { PlayerStats = GetComponent <ThorStats>(); }
private void Start() { Thor = Player.GetComponent <Thor>(); ThorStats = Player.GetComponent <ThorStats>(); AreaManager = GetComponent <AreaManager>(); }
private void Start() { PlayerStats = Player.GetComponent <ThorStats>(); PlayerMovement = Player.GetComponent <Thor>(); AreaManager = GetComponent <AreaManager>(); }
private void Start() { Stats = GameObject.FindGameObjectWithTag(TargetTag).GetComponent <ThorStats>(); }