void Start() { _Player = GameObject.FindWithTag(GameTags.player); _PlayerRb = _Player.GetComponent<Rigidbody2D>(); rb = GetComponent<Rigidbody2D>(); _LayerMask = LayerMask.GetMask("Player"); _ObstacleMask = LayerMask.GetMask("Ground"); _LeftShooter = GameObject.FindWithTag("LShoot"); _RightShooter = GameObject.FindWithTag("RShoot"); _SpearThrowL = _LeftShooter.GetComponent<SpearShooter>(); _SpearThrowR = _RightShooter.GetComponent<SpearShooter>(); }
void Start() { _Player = GameObject.FindWithTag(GameTags.player); _PlayerRb = _Player.GetComponent <Rigidbody2D>(); rb = GetComponent <Rigidbody2D>(); _LayerMask = LayerMask.GetMask("Player"); _ObstacleMask = LayerMask.GetMask("Ground"); _LeftShooter = GameObject.FindWithTag("LShoot"); _RightShooter = GameObject.FindWithTag("RShoot"); _SpearThrowL = _LeftShooter.GetComponent <SpearShooter>(); _SpearThrowR = _RightShooter.GetComponent <SpearShooter>(); }