annotate src/test/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkNodeOperationTest.cs @ 17:01a08cf4b2d9

Liq Files
author Kazuma
date Mon, 07 Nov 2016 01:05:24 +0900
parents 4c8932dad7b2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
1 using UnityEngine;
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
2 using System.Collections;
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
3 using MsgPack;
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
4
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
5 public class NetworkNodeOperationTest : MonoBehaviour {
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
6
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
7 // Use this for initialization
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
8 void Start () {
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
9 NetworkAppendChildAtOperation op = new NetworkAppendChildAtOperation(3);
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
10 NetworkNodeOperation nOp = new NetworkNodeOperation(op);
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
11
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
12 ObjectPacker pack = new ObjectPacker();
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
13 byte[] value = pack.Pack(nOp);
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
14
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
15 ObjectPacker unpack = new ObjectPacker();
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
16 NetworkNodeOperation mnp = unpack.Unpack<NetworkNodeOperation>(value);
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
17 print (mnp.getCommand());
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
18 print (mnp.getPosition());
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
19 }
4c8932dad7b2 Add Test and only NetworkTreeOperationLogTest.cs not work.
Kazuma
parents:
diff changeset
20 }