private void Update() { if (GameManager.instance.IsPlaying) { if (swipeController.SwipeUp) { direction = MapManager.Direction.Up; } else if (swipeController.SwipeDown) { direction = MapManager.Direction.Down; } else if (swipeController.SwipeLeft) { direction = MapManager.Direction.Left; } else if (swipeController.SwipeRight) { direction = MapManager.Direction.Right; } else { direction = MapManager.Direction.Pause; return; } Move(); } }
void GestureAnimationStart(MapManager.Direction dir) { SoundManager.PlaySound(SoundManager.Sound.ImagePopup); Gesture.GetComponentInChildren <Animator>().SetInteger("Direction", ((int)dir - 1)); Gesture.GetComponentInChildren <Text>().text = GestureText[(int)dir - 1]; }
public void RecordPlay(MapManager.Direction dir, Vector3 currentPos, Vector3 targetPos, Vector3 searchPos) { playingRecords.Push(new PlayingRecord(playingRecords.Count, (int)dir, currentPos, targetPos, searchPos)); }