diff options
author | Maor Itzkovitch <maor.tt@gmail.com> | 2015-08-01 12:38:47 +0300 |
---|---|---|
committer | Maor Itzkovitch <maor.tt@gmail.com> | 2015-08-01 12:38:47 +0300 |
commit | 81c2b185efcc729777d86815577cd6ebdd7e15c4 (patch) | |
tree | 93e8d37b6ad0393c0d52c4163ffeea638547cf00 /tests/MyGame/Example/Vec3.cs | |
parent | 6e192fa4087aaafd17a050ee5da3d4a043352055 (diff) | |
download | flatbuffers-81c2b185efcc729777d86815577cd6ebdd7e15c4.tar.gz flatbuffers-81c2b185efcc729777d86815577cd6ebdd7e15c4.tar.bz2 flatbuffers-81c2b185efcc729777d86815577cd6ebdd7e15c4.zip |
support for scalar mutators
Diffstat (limited to 'tests/MyGame/Example/Vec3.cs')
-rw-r--r-- | tests/MyGame/Example/Vec3.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/MyGame/Example/Vec3.cs b/tests/MyGame/Example/Vec3.cs index 732f2d65..090dd199 100644 --- a/tests/MyGame/Example/Vec3.cs +++ b/tests/MyGame/Example/Vec3.cs @@ -9,10 +9,15 @@ public sealed class Vec3 : Struct { public Vec3 __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; return this; } public float X { get { return bb.GetFloat(bb_pos + 0); } } + public void MutateX(float x) { bb.PutFloat(bb_pos + 0); } public float Y { get { return bb.GetFloat(bb_pos + 4); } } + public void MutateY(float y) { bb.PutFloat(bb_pos + 4); } public float Z { get { return bb.GetFloat(bb_pos + 8); } } + public void MutateZ(float z) { bb.PutFloat(bb_pos + 8); } public double Test1 { get { return bb.GetDouble(bb_pos + 16); } } + public void MutateTest1(double test1) { bb.PutDouble(bb_pos + 16); } public Color Test2 { get { return (Color)bb.GetSbyte(bb_pos + 24); } } + public void MutateTest2(sbyte test2) { bb.PutSbyte(bb_pos + 24); } public Test Test3 { get { return GetTest3(new Test()); } } public Test GetTest3(Test obj) { return obj.__init(bb_pos + 26, bb); } |