+ searchHavePlace: function(){
+ var nodes = ctl.getObjs();
+ l = nodes.length;
+ var ununFlg = false;
+
+ for (var key in nodes) {
+ var node = nodes[key];
+ if(this.yukkuri.id === node.id)continue;
+ if (!ununFlg
+ && node instanceof Unun
+ && !(this.targetNode instanceof Unun)
+ && this.yukkuri.within(node, this.yukkuri.getRange() / 2)) {
+ ununFlg = true;
+ this.targetNode = node;
+ this.setStatus(EAction.UNUN_SMELL_START);
+ return;
+ }
+ else if (node instanceof Food) {
+ if(this.yukkuri.isKuhuku() && this.yukkuri.within(node, this.yukkuri.getRange())){
+
+ //A yukkuri to go to the food area
+ this.targetNode = node;
+ this.setStatus(EAction.MOVE_TO_EAT_START);
+
+ return;
+ }else{
+ //not hunbry or not food.
+ }
+ }
+ else if(node instanceof Yukkuri){
+ if(this.yukkuri.isCommunication(node) && this.yukkuri.within(node, this.yukkuri.getRange())){
+ this.targetNode = node;
+ this.setStatus(EAction.COMMUNICATE_START);
+ return;
+ }
+ }
+ else if(node instanceof Place){
+ if(!node.isOwner() && !this.yukkuri.isPlace() && this.yukkuri.within(node, this.yukkuri.getRange())){
+ this.targetNode = node;
+ this.setStatus(EAction.MOVE_TO_PLACE_START_HOMELESS);
+ return;
+ }
+ }
+ }
+ this.status = EAction.WALK;
+ },