コード例 #1
0
        public static void GetParameterType(ObjectReferenceParameter obj, MethodReturnEventArgs <Type> e)
        {
            var def = obj.ObjectClass;

            e.Result = Type.GetType(def.Module.Namespace + "." + def.Name + ", " + Zetbox.API.Helper.InterfaceAssembly, true);
            BaseParameterActions.DecorateParameterType(obj, e, false);
        }
コード例 #2
0
        public void Read(EndianStream stream)
        {
            Time = stream.ReadSingle();

            FunctionName    = stream.ReadStringAligned();
            StringParameter = stream.ReadStringAligned();
            ObjectReferenceParameter.Read(stream);

            FloatParameter = stream.ReadSingle();
            IntParameter   = stream.ReadInt32();
            MessageOptions = stream.ReadInt32();
        }
コード例 #3
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(TimeName, Time);
            node.Add(FunctionNameName, FunctionName);
            node.Add(DataName, StringParameter);
            node.Add(ObjectReferenceParameterName, ObjectReferenceParameter.ExportYAML(container));
            node.Add(FloatParameterName, FloatParameter);
            node.Add(IntParameterName, IntParameter);
            node.Add(MessageOptionsName, MessageOptions);
            return(node);
        }
コード例 #4
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("time", Time);
            node.Add("functionName", FunctionName);
            node.Add("data", StringParameter);
            node.Add("objectReferenceParameter", ObjectReferenceParameter.ExportYAML(container));
            node.Add("floatParameter", FloatParameter);
            node.Add("intParameter", IntParameter);
            node.Add("messageOptions", MessageOptions);
            return(node);
        }
コード例 #5
0
        public void Read(AssetReader reader)
        {
            Time = reader.ReadSingle();

            FunctionName    = reader.ReadString();
            StringParameter = reader.ReadString();
            if (IsReadObjectReferenceParameter(reader.Version))
            {
                ObjectReferenceParameter.Read(reader);
                FloatParameter = reader.ReadSingle();
            }
            if (IsReadIntParameter(reader.Version))
            {
                IntParameter = reader.ReadInt32();
            }
            MessageOptions = reader.ReadInt32();
        }
コード例 #6
0
        public void Read(AssetStream stream)
        {
            Time = stream.ReadSingle();

            FunctionName    = stream.ReadStringAligned();
            StringParameter = stream.ReadStringAligned();
            if (IsReadObjectReferenceParameter(stream.Version))
            {
                ObjectReferenceParameter.Read(stream);
                FloatParameter = stream.ReadSingle();
            }
            if (IsReadIntParameter(stream.Version))
            {
                IntParameter = stream.ReadInt32();
            }
            MessageOptions = stream.ReadInt32();
        }
コード例 #7
0
 public static void GetParameterTypeString(ObjectReferenceParameter obj, MethodReturnEventArgs<string> e)
 {
     var def = obj.ObjectClass;
     if (def == null)
     {
         e.Result = "<no type>";
     }
     else if (def.Module == null)
     {
         e.Result = "<no namespace>." + def.Name;
     }
     else
     {
         e.Result = def.Module.Namespace + "." + def.Name;
     }
     BaseParameterActions.DecorateParameterType(obj, e, false);
 }
コード例 #8
0
 public IEnumerable <Object> FetchDependencies(bool isLog = false)
 {
     if (!ObjectReferenceParameter.IsNull)
     {
         Object @object = ObjectReferenceParameter.FindObject();
         if (@object == null)
         {
             if (isLog)
             {
                 Logger.Log(LogType.Warning, LogCategory.Export, $"AnimationEvent's objectReferenceParameter {ObjectReferenceParameter.ToLogString()} wasn't found ");
             }
         }
         else
         {
             yield return(@object);
         }
     }
 }
コード例 #9
0
        public static void GetParameterTypeString(ObjectReferenceParameter obj, MethodReturnEventArgs <string> e)
        {
            var def = obj.ObjectClass;

            if (def == null)
            {
                e.Result = "<no type>";
            }
            else if (def.Module == null)
            {
                e.Result = "<no namespace>." + def.Name;
            }
            else
            {
                e.Result = def.Module.Namespace + "." + def.Name;
            }
            BaseParameterActions.DecorateParameterType(obj, e, false);
        }
コード例 #10
0
 public IEnumerable <Object> FetchDependencies(ISerializedFile file, bool isLog = false)
 {
     yield return(ObjectReferenceParameter.FetchDependency(file, isLog, () => nameof(AnimationEvent), "objectReferenceParameter"));
 }
コード例 #11
0
 public static void GetParameterType(ObjectReferenceParameter obj, MethodReturnEventArgs<Type> e)
 {
     var def = obj.ObjectClass;
     e.Result = Type.GetType(def.Module.Namespace + "." + def.Name + ", " + Zetbox.API.Helper.InterfaceAssembly, true);
     BaseParameterActions.DecorateParameterType(obj, e, false);
 }