Ejemplo n.º 1
0
 public void ShowRemoveComponentMenu(MachineComponent current)
 {
     if (current != null)
     {
         this.currentState = InGameMenuState.removeComponentMenu;
         this.removeMenu.Show();
     }
 }
Ejemplo n.º 2
0
        public ComponentType RemoveCurrentComponent()
        {
            ComponentType currentComponent = ComponentType.none;

            // user clicked remove button
            if ( this.currentSelected != null )
            {
                // remove component from draw-set and list.
                //this.addMenu.ComponentRemovedFromStage(this.currentSelected.myComponentType());
                currentComponent = currentSelected.myComponentType();
                this.currentSelected.RemoveFromAutoDrawSet();
                machineComponentList.Remove(this.currentSelected);
            }

            this.currentSelected = null;

            return currentComponent;
        }
Ejemplo n.º 3
0
 public void AddComponent(MachineComponent newComponent)
 {
     machineComponentList.AddLast(newComponent);
 }
Ejemplo n.º 4
0
        public void HandleSingleTap(Vector2 touchLocation)
        {
            this.currentSelected = null;
            touchLocation = HudBar.screenToWorld(touchLocation);

            // see if user touched a component.
            foreach (MachineComponent current in machineComponentList)
            {
                if (current != null)
                {
                    if (current.selected(touchLocation))
                    {
                        this.currentSelected = current;
                    }
                }
            }
        }