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

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

@ -26,19 +26,19 @@ namespace Fungus
FungusScript fungusScript = GetFungusScript();
ReceiveMessage[] receivers = null;
MessageReceived[] receivers = null;
if (messageTarget == MessageTarget.SameScript)
{
receivers = fungusScript.GetComponentsInChildren<ReceiveMessage>();
receivers = fungusScript.GetComponentsInChildren<MessageReceived>();
}
else
{
receivers = GameObject.FindObjectsOfType<ReceiveMessage>();
receivers = GameObject.FindObjectsOfType<MessageReceived>();
}
if (receivers != null)
{
foreach (ReceiveMessage receiver in receivers)
foreach (MessageReceived receiver in receivers)
{
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
{
[EventHandlerInfo("",
"Start Game",
"Game Started",
"The sequence will execute when the game starts playing.")]
public class StartGame : EventHandler
public class GameStarted : EventHandler
{
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
{
[EventHandlerInfo("",
"Receive Message",
"The sequence will execute when the specified message is received from a SendFungusMessage command.")]
public class ReceiveMessage : EventHandler
"Message Received",
"The sequence will execute when the specified message is received from a Send Message command.")]
public class MessageReceived : EventHandler
{
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
{
[EventHandlerInfo("",
"Enable Object",
"Object Enabled",
"The sequence will execute when the owner game object is enabled.")]
public class EnableObject : EventHandler
public class ObjectEnabled : EventHandler
{
protected virtual void OnEnable()
{

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

Loading…
Cancel
Save