public void Garally(Button.Type t) { switch (t) { case Button.Type.LEFT: Play("OK"); Creature.TexNum += Creature.GetLen() - 1; Creature.TexNum %= Creature.GetLen(); AutoBackTimer = 50; break; case Button.Type.CENTER: Play("OK"); GameState = State.IDLE; AutoBackTimer = 50; break; case Button.Type.RIGHT: Play("OK"); Creature.TexNum++; Creature.TexNum %= Creature.GetLen(); AutoBackTimer = 50; break; default: throw new System.Exception("Invald Input" + t); } }
public void Menu(Button.Type t) { switch (t) { case Button.Type.LEFT: Play("OK"); Mode.TexNum += Mode.GetLen() - 1; Mode.TexNum %= Mode.GetLen(); AutoBackTimer = 30; break; case Button.Type.CENTER: Play("OK"); if (Mode.TexNum + 2 == (int)State.CONFIG) { AutoBackTimer = 30; break; } ; AutoBackTimer = Mode.TexNum + 2 >= (int)State.GAME ? 100 : 20; GameState = (State)((Mode.TexNum + 2) % 9); if (GameState == State.TOUCH) { LifeData.Sick = 0; Play("Gyun"); } if (GameState == State.FEED) { Play("Gyun"); LifeData.Hungery = 0; StartCoroutine(FoodDicrease(20)); } if (GameState == State.CLEAN) { LifeData.Dirty = 0; StartCoroutine(CleanerMove(20)); StartCoroutine(DirtDicrease(20)); } ; if (GameState == State.GARALLY) { Creature.TexNum = 0; } if (GameState == State.TOUCH) { StartCoroutine(TouchMove(20)); } break; case Button.Type.RIGHT: Play("OK"); Mode.TexNum++; Mode.TexNum %= Mode.GetLen(); AutoBackTimer = 30; break; default: throw new System.Exception("Invald Input" + t); } }
public void Config(Button.Type t) { switch (t) { case Button.Type.LEFT: break; case Button.Type.CENTER: break; case Button.Type.RIGHT: break; default: throw new System.Exception("Invald Input" + t); } }
public void ReciveInput(Button.Type t) { Debug.Log(t); switch (GameState) { case State.IDLE: Idele(t); break; case State.MENU: Menu(t); break; case State.TOUCH: Touch(t); break; case State.FEED: Feed(t); break; case State.CLEAN: Clean(t); break; case State.CONFIG: Config(t); break; case State.GARALLY: Garally(t); break; case State.COMMUNICATION: Communication(t); break; case State.GAME: Game(t); break; } }
public void Clean(Button.Type t) { switch (t) { case Button.Type.LEFT: Play("OK"); break; case Button.Type.CENTER: Play("OK"); break; case Button.Type.RIGHT: Play("OK"); break; default: throw new System.Exception("Invald Input" + t); } }
public void Communication(Button.Type t) { switch (t) { case Button.Type.LEFT: Play("NG"); break; case Button.Type.CENTER: Play("OK"); GameState = State.IDLE; break; case Button.Type.RIGHT: Play("NG"); break; default: throw new System.Exception("Invald Input" + t); } }
public void Idele(Button.Type t) { switch (t) { case Button.Type.LEFT: Play("NG"); break; case Button.Type.CENTER: GameState = State.MENU; AutoBackTimer = 50; StartCoroutine(AutoBack(State.IDLE)); Play("OK"); break; case Button.Type.RIGHT: Play("NG"); break; default: throw new System.Exception("Invald Input" + t); } }
public void Game(Button.Type t) { switch (t) { case Button.Type.LEFT: switch (GFase) { case 0: Play("OK"); GameState = State.IDLE; break; case 1: if (Pos == 2) { Play("OK"); Point += 1; } else { Play("NG"); } break; case 2: break; } break; case Button.Type.CENTER: switch (GFase) { case 0: Play("OK"); GFase++; Point = 0; AutoBackTimer = 100; break; case 1: if (Pos == 0) { Play("OK"); Point += 1; } else { Play("NG"); } break; case 2: Play("OK"); GFase = 0; GameState = State.IDLE; break; } break; case Button.Type.RIGHT: switch (GFase) { case 0: Play("NG"); break; case 1: if (Pos == 1) { Play("OK"); Point += 1; } else { Play("NG"); } break; case 2: Play("NG"); break; } break; default: throw new System.Exception("Invald Input" + t); } }