Ejemplo n.º 1
0
 public void checkPlayerObjectCollision(Bounds playerBounds)
 {
     if (tileMapData != null)
     {
         currentNodeIndex = tileMapData.checkObjectCollision(playerBounds) + 1;
         if (currentNodeIndex > 0)
         {
             currentNode = (ZoneTreeNode)zoneTree.getNodeCheckingRootBranchList(currentNodeIndex);
             if (currentNode != null)
             {
                 //Enter battles automatically
                 if (currentNode.content.nodeType == ZoneNodeType.Battle)
                 {
                     ZoneNodeButtonClick();
                 }
                 else if (currentNode.content.nodeType != ZoneNodeType.Lock)
                 {
                     panelText.text      = currentNode.content.nodeName + " " + currentNode.content.description;
                     panelButton.enabled = true;
                 }
             }
             else
             {
                 panelText.text      = "";
                 panelButton.enabled = false;
             }
         }
         else
         {
             panelText.text      = "";
             panelButton.enabled = false;
         }
     }
 }