Esempio n. 1
0
 public virtual void ActionUp(BaseEventData baseEvent)
 {
     if (!frozen)
     {
         if (!editorMode)
         {
         }
         else
         {
             if (dragged)
             {
                 int x = (int)position.x, y = (int)position.y;
                 editorManager.level.channels[y, x] = new Channel(gameManager, levelManager, editorManager, editorManager.level.group.transform, 5, 0, 0, editorManager.level.channelSize, new Vector2(x, y), editorManager.level.size).gameObject;
                 editorManager.level.channels[y, x].GetComponent <Button>().onClick.AddListener(() => editorManager.ActionFocusLevel());
                 this.GetComponentInChildren <BehaviourGrid>().transform.SetParent(editorManager.level.channels[y, x].transform);
                 Destroy(this.gameObject);
                 editorManager.ActionToolsBasicUp(channelID, false);
             }
         }
     }
 }