public void JumpSwitchCheckerboard(ERoleType Rtype, ECheckerboardType Ctype, Action Callback) { Transform[] pathTrans = new Transform[2]; switch (Ctype) { case ECheckerboardType.eNormal: GameApp.Instance.SoundInstance.PlayBgm("BGM_MainGame_Normal"); pathTrans[0] = BossSquaresLst[GetSchedule()].transform; pathTrans[1] = NormalSquaresLst[0].transform; break; case ECheckerboardType.eBoss: GameApp.Instance.SoundInstance.PlayBgm("BGM_MainGame_Boss"); pathTrans[0] = NormalSquaresLst[GetSchedule()].transform; pathTrans[1] = BossSquaresLst[0].transform; break; } CurCheckerboardType[(int)Rtype] = Ctype; ChangeSchedule(0); JumpOverCallback = Callback; StartCoroutine(Teleport(pathTrans, Callback)); }
public void Move(ERoleType _type, int _num, Action _end) { if (!EnableMove) { return; } CurRoleType = _type; ECheckerboardType cType = CurCheckerboardType[(int)CurRoleType]; MoveEndCB = _end; EnableMove = false; if (_num > 0) { switch (cType) { case ECheckerboardType.eNormal: Advance(_num); break; case ECheckerboardType.eBoss: AdvanceOnBossCheckerboard(_num); break; } } else if (_num < 0) { switch (cType) { case ECheckerboardType.eNormal: Retreat(_num); break; case ECheckerboardType.eBoss: break; } } else { EnableMove = true; if (MoveEndCB != null) { MoveEndCB(); MoveEndCB = null; } } }