File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,17 @@ struct CursorMapping {
2323
2424 private Mover mover ;
2525 private Health playerHealth ;
26+ private Camera mainCamera ;
2627
2728 private void Awake ( ) {
2829 mover = GetComponent < Mover > ( ) ;
2930 playerHealth = GetComponent < Health > ( ) ;
3031 }
3132
33+ private void Start ( ) {
34+ mainCamera = Camera . main ;
35+ }
36+
3237 private void Update ( ) {
3338 if ( Input . GetKey ( "escape" ) ) {
3439 Application . Quit ( ) ;
@@ -129,7 +134,7 @@ private CursorMapping GetCursorMapping(CursorType type) {
129134 }
130135
131136 private Ray GetMouseRay ( ) {
132- return Camera . main . ScreenPointToRay ( Input . mousePosition ) ;
137+ return mainCamera . ScreenPointToRay ( Input . mousePosition ) ;
133138 }
134139
135140 public void SetCursor ( CursorType type ) {
Original file line number Diff line number Diff line change 33// TODO Turn quests into scriptable objects
44public class Liberator : Quest {
55 private void Awake ( ) {
6- QuestName = "Ultimate Slayer " ;
6+ QuestName = "Liberator " ;
77 Description = "Liberate the village from bandits." ;
88 ItemReward = null ;
99 ExperienceReward = 1000 ;
You can’t perform that action at this time.
0 commit comments