private void DisplayProperty(string name, VariableProperty property)
        {
            GUILayout.BeginHorizontal();
            GUILayout.Label(name);

            switch (property.PropertyType)
            {
            case VariableProperty.Type.Boolean:
                property.Set(GUILayout.Toggle(property.GetBoolean(), GUIContent.none));
                break;

            case VariableProperty.Type.Number:
                property.Set(EditorGUILayout.DoubleField(property.GetNumber()));
                break;

            case VariableProperty.Type.String:
                property.Set(GUILayout.TextField(property.GetString()));
                break;

            case VariableProperty.Type.Object:
                property.Set(EditorGUILayout.ObjectField(property.GetObject(), property.GetObjectType(), true));
                break;

            case VariableProperty.Type.Vector:
                property.Set(EditorGUILayout.Vector2Field("", property.GetVector()));
                break;
            }

            GUILayout.EndHorizontal();
        }
 public void ManualExecute(GameObject invoker, PhotonMessageInfo info)
 {
     if (!executed)
     {
         if (storeOwner != null)
         {
             storeOwner.Set((GameObject)info.Sender.TagObject, gameObject);
         }
         ExecuteTrigger(invoker == null ? gameObject : invoker);
         executed = true;
     }
 }
Ejemplo n.º 3
0
 protected override void ExecuteTrigger(GameObject target = null)
 {
     if (target != null)
     {
         storeInvoker.Set(target);
     }
     base.ExecuteTrigger(target);
 }