public static void LoadUIElement(FakeStruct fake, UIElement parent) { UIElement ui = new UIElement(); ui.parent = parent; ui.name = fake.GetData <string>(1); }
public void Load(FakeStruct fake) { a = (byte)fake[1]; b = (Int16)fake[2]; c = fake[3]; d = fake.GetInt64(4); e = fake.GetFloat(6); f = fake.GetDouble(7); g = fake.GetData <string>(9); var h_t = fake.GetData <FakeStruct>(10); if (h_t != null) { h = new TestA(); h.Load(h_t); } v = DBStructProc.LoadVector2(fake, 11); v3 = DBStructProc.LoadVector3(fake, 13); v4 = DBStructProc.LoadVector4(fake, 16); col = DBStructProc.LoadColor(fake, 20); col32 = DBStructProc.LoadColor32(fake, 24); q = DBStructProc.LoadQuaternion(fake, 25); }
public void LoadFromBuffer(FakeStruct fake) { var fsa = fake.GetData <FakeStructArray>(0); var fsa2 = fake.GetData <FakeStructArray>(1); int max = fsa.Length; if (max > lines.Count) { max = lines.Count; } for (int i = 0; i < max; i++) { lines[i].LoadFromBuffer(fsa, i); } max = fsa2.Length; if (max > areas.Count) { max = areas.Count; } for (int i = 0; i < max; i++) { areas[i].LoadFromBuffer(fsa2, i); } }
public static void LoadUI(FakeStruct fake, UIElement parent) { string type = fake.GetData <string>(0); switch (type) { case "UIElement": LoadUIElement(fake, parent); break; case "HImage": LoadUIElement(fake, parent); break; } }
public void Load(FakeStruct fake) { a = fake.GetData <Int32[]>(1); var b_t = fake.GetData <FakeStringArray>(2); if (b_t != null) { b = b_t.Data; } var c_t = fake.GetData <Int16[]>(3); if (c_t != null) { c = new TestB[c_t.Length]; for (int i = 0; i < c_t.Length; i++) { if (c_t[i] >= 0) { c[i] = new TestB(); c[i].Load(fake.buffer.GetData(c_t[i]) as FakeStruct); } } } var d_t = fake.GetData <Int32[]>(4); if (d_t != null) { d = new List <Int32>(); d.AddRange(d_t); } var e_t = fake.GetData <FakeStringArray>(5); if (e_t != null) { e.AddRange(e_t.Data); } var f_t = fake.GetData <Int16[]>(6); if (f_t != null) { f = new List <TestB>(); for (int i = 0; i < f_t.Length; i++) { if (f_t[i] >= 0) { var f_s = new TestB(); f_s.Load(fake.buffer.GetData(f_t[i]) as FakeStruct); f.Add(f_s); } } } scroll = (ScrollType)fake[7]; v2 = fake.buffer.GetArray <Vector2>(fake[8]); v3 = fake.buffer.GetArray <Vector3>(fake[9]); var v4_t = fake.buffer.GetArray <Vector4>(fake[10]); if (v4 != null) { v4 = new List <Vector4>(); v4.AddRange(v4_t); } }