view src/test/csharp/jp.ac.u-ryukyu.ie.cr/jungle/core/nodeeditor/PutAttributeTest.cs @ 0:dec15de2c6ff

first commit
author Kazuma
date Tue, 21 Jun 2016 17:11:12 +0900
parents
children 4d08270a61c8 02b2ab7bffe6
line wrap: on
line source

using UnityEngine;
using System.Collections;

public class PutAttributeTest : MonoBehaviour {

	string key = "hoge";
	public GameObject value;

	// Use this for initialization
	void Start () {
		TreeNode node = new DefaultTreeNode ();
		PutAttribute op = new PutAttribute (key, value);

		Either<Error, LoggingNode> either = op.edit (node);
		if (either.isA ()) {
			Debug.Log ("Error発生");
		}
		LoggingNode newnode = either.b ();
		Debug.Log (newnode);
		GameObject ret = newnode.getAttributes ().get (key);
		Debug.Log ("insertしたものは" + ret);
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}