Skip to content

Commit 33c5bea

Browse files
authored
Merge pull request #173 from mjavaly/cpimhoff/last-fixes
Some Last Cleanups
2 parents 45c65de + 2154fbb commit 33c5bea

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

Project/Assets/Editor/CustomInspectors/ComponentToggleInteractionEditor.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ public override void OnInspectorGUI ()
1515
{
1616
// Configuration:
1717
bool _repeatable = EditorGUILayout.Toggle ("Repeatable?", componentToggle.repeatable);
18-
Behaviour[] _targets = PrairieGUI.drawObjectList<Behaviour> ("Behaviours To Toggle:", componentToggle.target);
18+
Behaviour[] _targets = PrairieGUI.drawObjectList<Behaviour> ("Behaviours To Toggle:", componentToggle.targets);
1919

2020
// Save:
2121
if (GUI.changed) {
2222
Undo.RecordObject(componentToggle, "Modify Component Toggle");
2323
componentToggle.repeatable = _repeatable;
24-
componentToggle.target = _targets;
24+
componentToggle.targets = _targets;
2525
}
2626

2727
// Warnings (after properties have been updated):
@@ -30,7 +30,7 @@ public override void OnInspectorGUI ()
3030

3131
public void DrawWarnings()
3232
{
33-
foreach (Behaviour behaviour in componentToggle.target)
33+
foreach (Behaviour behaviour in componentToggle.targets)
3434
{
3535
if (behaviour == null)
3636
{

Project/Assets/Editor/Twine Importer/TwineImporterUI.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private bool isValidJson()
117117
// that it has a "startnode" attribute. Valid Twison must
118118
// have a startnode indicator!
119119
return parsedJson["startnode"] != null;
120-
} catch (Exception e)
120+
} catch
121121
{
122122
return false;
123123
}

Project/Assets/Prairie/Framework/Script/Interaction/ComponentToggleInteraction.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
[AddComponentMenu("Prairie/Interactions/Toggle Component")]
55
public class ComponentToggleInteraction : PromptInteraction
66
{
7-
public Behaviour[] target = new Behaviour[0];
7+
public Behaviour[] targets = new Behaviour[0];
88

99
void OnDrawGizmosSelected()
1010
{
1111
Gizmos.color = Color.red;
12-
for (int i = 0; i < target.Length; i++)
12+
for (int i = 0; i < targets.Length; i++)
1313
{
1414
// Draw red line(s) between the object and the objects whose Behaviours it toggles
15-
if (target[i] != null)
15+
if (targets[i] != null)
1616
{
17-
Gizmos.DrawLine(transform.position, target[i].transform.position);
17+
Gizmos.DrawLine(transform.position, targets[i].transform.position);
1818
}
1919

2020
}
2121
}
2222

2323
protected override void PerformAction ()
2424
{
25-
for (int i = 0; i < target.Length; i++)
25+
for (int i = 0; i < targets.Length; i++)
2626
{
27-
target[i].enabled = !target[i].enabled;
27+
targets[i].enabled = !targets[i].enabled;
2828
}
2929
}
3030

Project/Assets/Prairie/Framework/Script/Interaction/FirstPersonInteractor.cs

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ public void OnTriggerEnter(Collider other)
144144
{
145145
GameObject inside = other.gameObject;
146146
// automatically trigger area we're now inside of's interactions
147-
List<Interaction> toTrigger = new List<Interaction>();
148147
foreach (Interaction i in inside.GetComponents<Interaction> ())
149148
{
150149
if (!(i is Annotation))

0 commit comments

Comments
 (0)