예제 #1
0
파일: SelectScene.cs 프로젝트: sinshu/mafia
 public int Tick(SelectInput input)
 {
     selectSound = false;
     if (input.Left && !input.Right)
     {
         if (stageIndex == 0)
         {
             stageIndex = stages.Length - 1;
         }
         else
         {
             stageIndex--;
         }
         selectSound = true;
     }
     else if (input.Right && !input.Left)
     {
         stageIndex = (stageIndex + 1) % stages.Length;
         selectSound = true;
     }
     if (input.Ok)
     {
         return stageIndex;
     }
     if (input.GotoTitle)
     {
         return GOTO_TITLE;
     }
     return NONE;
 }
예제 #2
0
 public int Tick(SelectInput input)
 {
     selectSound = false;
     if (input.Left && !input.Right)
     {
         if (stageIndex == 0)
         {
             stageIndex = stages.Length - 1;
         }
         else
         {
             stageIndex--;
         }
         selectSound = true;
     }
     else if (input.Right && !input.Left)
     {
         stageIndex  = (stageIndex + 1) % stages.Length;
         selectSound = true;
     }
     if (input.Ok)
     {
         return(stageIndex);
     }
     if (input.GotoTitle)
     {
         return(GOTO_TITLE);
     }
     return(NONE);
 }