-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWinAction.cs
More file actions
74 lines (69 loc) · 2.68 KB
/
WinAction.cs
File metadata and controls
74 lines (69 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using Unity.LEGO.Game;
using Unity.LEGO.Behaviours.Triggers;
namespace Unity.LEGO.Behaviours.Actions
{
public class WinAction : ObjectiveAction
{
public override ObjectiveConfiguration GetDefaultObjectiveConfiguration(Trigger trigger)
{
ObjectiveConfiguration result = new ObjectiveConfiguration();
if (trigger)
{
var triggerType = trigger.GetType();
if (triggerType == typeof(PickupTrigger))
{
result.Title = "Collect all the Pickups";
result.Description = "Go get 'em!";
result.ProgressType = ObjectiveProgressType.Amount;
}
else if (triggerType == typeof(TouchTrigger))
{
result.Title = "Touch the Object";
result.Description = "Touch it!";
}
else if (triggerType == typeof(NearbyTrigger))
{
result.Title = "Get to the Object";
result.Description = "Get there!";
}
else if (triggerType == typeof(TimerTrigger))
{
result.Title = "Survive";
result.Description = "Hang in there!";
result.ProgressType = ObjectiveProgressType.Time;
}
else if (triggerType == typeof(RandomTrigger))
{
result.Title = "Survive for a Random Time";
result.Description = "Hang in there!";
}
else if (triggerType == typeof(InputTrigger))
{
result.Title = "Press the Button";
result.Description = "Push it!";
}
else if (triggerType == typeof(CounterTrigger))
{
result.Title = "Complete the Objective";
result.Description = "Just do it!";
}
else
{
result.Title = "Complete the Objective";
result.Description = "Just do it!";
}
}
else
{
result.Title = "Easy as Pie!";
result.Description = "Connect a Trigger Brick to the Win Brick to make this objective more challenging.";
}
return result;
}
protected override void Reset()
{
base.Reset();
m_IconPath = "Assets/LEGO/Gizmos/LEGO Behaviour Icons/Win Action.png";
}
}
}