Example #1
0
 protected virtual void updateState(ExplicitInputState input)
 {
     if (input.isActive(InputState.Control.SELECT)) {
         this.perform();
     }
     if (input.isActive(InputState.Control.UP)) {
         this.selectSound.play();
         this.previous.select();
     }
     if (input.isActive(InputState.Control.DOWN)) {
         this.selectSound.play();
         this.next.select();
     }
 }
Example #2
0
        protected override void updateState(ExplicitInputState input)
        {
            if (this.active) {
                if (input.isActive(InputState.Control.UP) ||
                        input.isActive(InputState.Control.DOWN)) {

                    this.active = false;
                    this.clickSound.play();
                    base.updateState(input);
                } else if (input.isActive(InputState.Control.EXIT) ||
                    input.isActive(InputState.Control.BACK)) {
                    this.active = false;
                    this.clickSound.play();
                } else if (input.isActive(InputState.Control.RIGHT)) {
                    this.selectSound.play();
                    this.next();
                    this.selectedItem.select();
                } else if (input.isActive(InputState.Control.LEFT)) {
                    this.selectSound.play();
                    this.prev();
                    this.selectedItem.select();
                } else if (input.isActive(InputState.Control.SELECT)) {
                    this.clickSound.play();
                    this.selectedItem.select();
                    this.selectedItem.perform();
                    this.perform();
                }

            } else if (input.isActive(InputState.Control.SELECT)) {
                this.active = true;
                this.selectedIndex = 0;
                this.selectedItem.select();
                this.clickSound.play();
            } else {
                base.updateState(input);
            }
        }
Example #3
0
 private void updatePauseState(ExplicitInputState input)
 {
     if (input.isActive(InputState.Control.PAUSE)) {
         if (this.paused) {
             this.song.play();
         } else {
             this.song.pause();
         }
         this.paused = !this.paused;
     }
 }