20
|
1 using UnityEngine;
|
|
2 using System.Collections;
|
|
3
|
|
4 namespace JungleDB {
|
|
5 public class NetworkDeleteChildAtOperation : NodeOperation {
|
|
6
|
|
7 private int Position;
|
|
8
|
|
9 public NetworkDeleteChildAtOperation () {
|
|
10
|
|
11 }
|
|
12
|
|
13 public NetworkDeleteChildAtOperation(int pos) {
|
|
14 this.Position = pos;
|
|
15 }
|
|
16
|
|
17 public Command getCommand () {
|
|
18 return Command.DELETE_CHILD;
|
|
19 }
|
|
20
|
|
21 public Either<Error, TreeNode> invoke (TreeNode target) {
|
|
22 return target.getChildren().deleteChildAt(this.Position);
|
|
23 }
|
|
24
|
|
25 public int getPosition () {
|
|
26 return this.Position;
|
|
27 }
|
|
28
|
|
29 public string getKey() {
|
|
30 return null;
|
|
31 }
|
|
32
|
|
33 public byte[] getValue () {
|
|
34 return null;
|
|
35 }
|
|
36 }
|
|
37 }
|