protected override void UpdateFunc() { if (Input.GetMouseButtonDown(0)) { } else if (Input.GetMouseButton(0)) { bs = EditorMenuManager.instance.SelectActiveSquare(Camera.main.ScreenPointToRay(Input.mousePosition).origin); menuButton = EditorMenuManager.selectedEntityMenu; if (bs != null && menuButton != null && bs.squareData.disused == false) // && bs.squareData.system == false ) { if (bs.editingEntity == null) { ent = EditorMenuManager.instance.CreateEntityForEditing("ent_" + bs.squareData.row + "_" + bs.squareData.col, bs.gameObject.transform); bs.editingEntity = ent; } ent = bs.editingEntity; switch (menuButton.menuId) { case EntityMenu.Erase: bs.EraseEntity(); break; case EntityMenu.Entity01: case EntityMenu.Entity02: case EntityMenu.Entity03: case EntityMenu.Entity04: case EntityMenu.Entity05: case EntityMenu.Entity06: case EntityMenu.Entity07: case EntityMenu.Entity08: case EntityMenu.Entity09: ent.SetDefaultEntity((UInt16)(menuButton.menuId - EntityMenu.Entity01 + 1), menuButton.sprite); break; case EntityMenu.BombBox: ent.SetBombBox(); break; case EntityMenu.BombHorizontal: ent.SetBombHorizontal(); break; case EntityMenu.BombVertical: ent.SetBombVertical(); break; case EntityMenu.BombMissile: ent.SetBombMissile(); break; case EntityMenu.Restrict: ent.SetLock(menuButton.sprite); break; case EntityMenu.RandomEntity: ent.SetRandomEntity(menuButton.sprite); break; // case EntityMenu.RandomBox: // bs.SetRandomBox(entityMenu.sprite); // break; case EntityMenu.RandomBombBox: ent.SetRandomBombBox(menuButton.sprite); break; case EntityMenu.RandomBombLine: ent.SetRandomBombLine(menuButton.sprite); break; case EntityMenu.RandomBombMissle: ent.SetRandomBombMissle(menuButton.sprite); break; case EntityMenu.RandomBombBoxLine: ent.SetRandomBombBoxLine(menuButton.sprite); break; case EntityMenu.RandomBombAll: ent.SetRandomBombAll(menuButton.sprite); break; case EntityMenu.MultiBomb01: ent.SetMultiBomb01(menuButton.sprite); break; case EntityMenu.MultiBomb02: ent.SetMultiBomb02(menuButton.sprite); break; } ent.entityData.ComposeId(); EditorMenuManager.instance.SaveEntityToLevel(bs.squareData.row, bs.squareData.col, ent.entityData.id); } } else if (Input.GetMouseButtonUp(0)) { } }