Skip to content

Commit c223966

Browse files
cached main camera call and updated quest description
1 parent 1828d28 commit c223966

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Control/PlayerController.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {

Questing/Quests/Liberator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// TODO Turn quests into scriptable objects
44
public 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;

0 commit comments

Comments
 (0)