private void Start() { config = (PlayerMovementConfig)Resources.Load("Configs/PlayerMovementConfig"); if (config == null) { Debug.LogWarning("Couldn't find Configs/PlayerMovementConfig!"); } rb2d = GetComponent <Rigidbody2D>(); FindThrusters(); levelBounds = Camera.main.GetComponent <FollowCamera>().GetBounds(); }
private void Start() { config = (PlayerMovementConfig)Resources.Load("Configs/PlayerMovementConfig"); if (config == null) { Debug.LogWarning("Couldn't find Configs/PlayerMovementConfig!"); } rb2d = GetComponent <Rigidbody2D>(); FindThrusters(); state = EnemyState.Hunt; player = GameObject.FindGameObjectWithTag("Player"); firstWayPoint = transform.position; }