Mercurial > hg > Database > jungle-sharp
comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/store/operations/PutAttributeOperation.cs @ 0:dec15de2c6ff
first commit
author | Kazuma |
---|---|
date | Tue, 21 Jun 2016 17:11:12 +0900 |
parents | |
children | 4d08270a61c8 02b2ab7bffe6 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:dec15de2c6ff |
---|---|
1 using UnityEngine; | |
2 | |
3 public class PutAttributeOperation : NodeOperation { | |
4 private string key; | |
5 private GameObject value; | |
6 | |
7 public PutAttributeOperation(string _key,GameObject _value) | |
8 { | |
9 key = _key; | |
10 value = _value; | |
11 } | |
12 | |
13 | |
14 public Command getCommand() | |
15 { | |
16 return Command.PUT_ATTRIBUTE; | |
17 } | |
18 | |
19 public Either<Error,TreeNode> invoke(TreeNode _target) | |
20 { | |
21 return _target.getAttributes().put(key,value); | |
22 } | |
23 public int getPosition() | |
24 { | |
25 return -1; | |
26 } | |
27 | |
28 public string getKey() | |
29 { | |
30 return key; | |
31 } | |
32 | |
33 public GameObject getValue() | |
34 { | |
35 return value; | |
36 } | |
37 } |