コード例 #1
0
 public static Offset <Component> CreateComponent(FlatBufferBuilder builder,
                                                  UComponent comp_type = UComponent.NONE,
                                                  int compOffset       = 0)
 {
     builder.StartObject(2);
     Component.AddComp(builder, compOffset);
     Component.AddCompType(builder, comp_type);
     return(Component.EndComponent(builder));
 }
コード例 #2
0
    public static Component GetComponent(this GameObject obj, UComponent uType)
    {
        Type sType = null;

        if (LuaGenConfig.uComponentDict.TryGetValue(uType, out sType))
        {
            return(obj.GetComponent(sType));
        }
        return(null);
    }
コード例 #3
0
 public static void AddCompType(FlatBufferBuilder builder, UComponent compType)
 {
     builder.AddByte(0, (byte)compType, 0);
 }