diff src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/store/operations/DeleteChildAtOperation.cs @ 0:dec15de2c6ff

first commit
author Kazuma
date Tue, 21 Jun 2016 17:11:12 +0900
parents
children 4d08270a61c8 02b2ab7bffe6
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/store/operations/DeleteChildAtOperation.cs	Tue Jun 21 17:11:12 2016 +0900
@@ -0,0 +1,39 @@
+using UnityEngine;
+using System.Collections;
+using System;
+
+public class DeleteChildAtOperation : NodeOperation {
+	private int pos;
+
+	public DeleteChildAtOperation(int _pos)
+	{
+		pos = _pos;
+	}
+
+
+	public Command getCommand()
+	{
+		return Command.DELETE_CHILD;
+	}
+
+	public Either<Error, TreeNode> invoke(TreeNode _target) 
+	{
+		return _target.getChildren().deleteChildAt(pos);
+	}
+
+	public int getPosition()
+	{
+		return pos;
+	}
+
+	public string getKey()
+	{
+		return null;
+	}
+
+	public GameObject getValue()
+	{
+		return null;
+	}
+
+}