Browse Source

Renamed all event handlers to use past tense (meaning is clearer)

master
chrisgregan 10 years ago
parent
commit
a918b530f3
  1. 45
      Assets/Examples/iTween/iTween.unity
  2. 8
      Assets/Fungus/FungusScript/Commands/SendMessage.cs
  3. 4
      Assets/Fungus/FungusScript/EventHandlers/GameStarted.cs
  4. 0
      Assets/Fungus/FungusScript/EventHandlers/GameStarted.cs.meta
  5. 6
      Assets/Fungus/FungusScript/EventHandlers/MessageReceived.cs
  6. 0
      Assets/Fungus/FungusScript/EventHandlers/MessageReceived.cs.meta
  7. 4
      Assets/Fungus/FungusScript/EventHandlers/ObjectEnabled.cs
  8. 0
      Assets/Fungus/FungusScript/EventHandlers/ObjectEnabled.cs.meta

45
Assets/Examples/iTween/iTween.unity

@ -203,7 +203,7 @@ MonoBehaviour:
space: 1 space: 1
--- !u!114 &470391088 --- !u!114 &470391088
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 470391086} m_GameObject: {fileID: 470391086}
@ -227,7 +227,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
nodeRect: nodeRect:
serializedVersion: 2 serializedVersion: 2
x: 342 x: 343
y: 122 y: 122
width: 120 width: 120
height: 30 height: 30
@ -254,7 +254,7 @@ MonoBehaviour:
serializedVersion: 2 serializedVersion: 2
x: -350 x: -350
y: -350 y: -350
width: 1212 width: 1213
height: 902 height: 902
selectedSequence: {fileID: 470391089} selectedSequence: {fileID: 470391089}
selectedCommands: [] selectedCommands: []
@ -374,6 +374,8 @@ GameObject:
- 114: {fileID: 868139016} - 114: {fileID: 868139016}
- 114: {fileID: 868139015} - 114: {fileID: 868139015}
- 114: {fileID: 868139017} - 114: {fileID: 868139017}
- 114: {fileID: 868139021}
- 114: {fileID: 868139019}
m_Layer: 0 m_Layer: 0
m_Name: FungusScript m_Name: FungusScript
m_TagString: Untagged m_TagString: Untagged
@ -464,13 +466,12 @@ MonoBehaviour:
zoom: 1 zoom: 1
scrollViewRect: scrollViewRect:
serializedVersion: 2 serializedVersion: 2
x: -350 x: -513
y: -350 y: -350
width: 1050 width: 1213
height: 1284 height: 1284
selectedSequence: {fileID: 868138992} selectedSequence: {fileID: 868138992}
selectedCommands: selectedCommands: []
- {fileID: 868139017}
variables: [] variables: []
runSlowInEditor: 1 runSlowInEditor: 1
runSlowDuration: .25 runSlowDuration: .25
@ -966,7 +967,7 @@ MonoBehaviour:
message: message:
--- !u!114 &868139016 --- !u!114 &868139016
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 868138990} m_GameObject: {fileID: 868138990}
@ -991,6 +992,32 @@ MonoBehaviour:
indentLevel: 0 indentLevel: 0
messageTarget: 1 messageTarget: 1
message: StartMoving message: StartMoving
--- !u!114 &868139019
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 868138990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d7d417659cd54a6787f70f763950c34, type: 3}
m_Name:
m_EditorClassIdentifier:
parentSequence: {fileID: 0}
message: StartMoving
--- !u!114 &868139021
MonoBehaviour:
m_ObjectHideFlags: 2
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 868138990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2d7d417659cd54a6787f70f763950c34, type: 3}
m_Name:
m_EditorClassIdentifier:
parentSequence: {fileID: 0}
message:
--- !u!1 &1090256565 --- !u!1 &1090256565
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1216,7 +1243,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3} m_Script: {fileID: 11500000, guid: 61dddfdc5e0e44ca298d8f46f7f5a915, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
selectedFungusScript: {fileID: 470391090} selectedFungusScript: {fileID: 868138993}
--- !u!4 &1971204865 --- !u!4 &1971204865
Transform: Transform:
m_ObjectHideFlags: 1 m_ObjectHideFlags: 1

8
Assets/Fungus/FungusScript/Commands/SendMessage.cs

@ -26,19 +26,19 @@ namespace Fungus
FungusScript fungusScript = GetFungusScript(); FungusScript fungusScript = GetFungusScript();
ReceiveMessage[] receivers = null; MessageReceived[] receivers = null;
if (messageTarget == MessageTarget.SameScript) if (messageTarget == MessageTarget.SameScript)
{ {
receivers = fungusScript.GetComponentsInChildren<ReceiveMessage>(); receivers = fungusScript.GetComponentsInChildren<MessageReceived>();
} }
else else
{ {
receivers = GameObject.FindObjectsOfType<ReceiveMessage>(); receivers = GameObject.FindObjectsOfType<MessageReceived>();
} }
if (receivers != null) if (receivers != null)
{ {
foreach (ReceiveMessage receiver in receivers) foreach (MessageReceived receiver in receivers)
{ {
receiver.OnSendFungusMessage(message); receiver.OnSendFungusMessage(message);
} }

4
Assets/Fungus/FungusScript/EventHandlers/StartGame.cs → Assets/Fungus/FungusScript/EventHandlers/GameStarted.cs

@ -6,9 +6,9 @@ using System.Collections.Generic;
namespace Fungus namespace Fungus
{ {
[EventHandlerInfo("", [EventHandlerInfo("",
"Start Game", "Game Started",
"The sequence will execute when the game starts playing.")] "The sequence will execute when the game starts playing.")]
public class StartGame : EventHandler public class GameStarted : EventHandler
{ {
protected virtual void Start() protected virtual void Start()
{ {

0
Assets/Fungus/FungusScript/EventHandlers/StartGame.cs.meta → Assets/Fungus/FungusScript/EventHandlers/GameStarted.cs.meta

6
Assets/Fungus/FungusScript/EventHandlers/ReceiveMessage.cs → Assets/Fungus/FungusScript/EventHandlers/MessageReceived.cs

@ -4,9 +4,9 @@ using System.Collections;
namespace Fungus namespace Fungus
{ {
[EventHandlerInfo("", [EventHandlerInfo("",
"Receive Message", "Message Received",
"The sequence will execute when the specified message is received from a SendFungusMessage command.")] "The sequence will execute when the specified message is received from a Send Message command.")]
public class ReceiveMessage : EventHandler public class MessageReceived : EventHandler
{ {
public string message; public string message;

0
Assets/Fungus/FungusScript/EventHandlers/ReceiveMessage.cs.meta → Assets/Fungus/FungusScript/EventHandlers/MessageReceived.cs.meta

4
Assets/Fungus/FungusScript/EventHandlers/EnableObject.cs → Assets/Fungus/FungusScript/EventHandlers/ObjectEnabled.cs

@ -6,9 +6,9 @@ using System.Collections.Generic;
namespace Fungus namespace Fungus
{ {
[EventHandlerInfo("", [EventHandlerInfo("",
"Enable Object", "Object Enabled",
"The sequence will execute when the owner game object is enabled.")] "The sequence will execute when the owner game object is enabled.")]
public class EnableObject : EventHandler public class ObjectEnabled : EventHandler
{ {
protected virtual void OnEnable() protected virtual void OnEnable()
{ {

0
Assets/Fungus/FungusScript/EventHandlers/EnableObject.cs.meta → Assets/Fungus/FungusScript/EventHandlers/ObjectEnabled.cs.meta

Loading…
Cancel
Save