Пример #1
0
 public override void ProcessInput(PlayerMovementFSM pc, PlayerMovementFSM.Inputs input)
 {
     if (input == PlayerMovementFSM.Inputs.RightMouseClick)
     {
         pc.ClearPath();
     }
     if (pc.currentPath != null)
     {
         pc.TransitionToState(pc.moving);
     }
     if (input == PlayerMovementFSM.Inputs.LeftMouseClick)
     {
         pc.currentPath = GameManager.Instance.fieldScript.GetPath(TileField.IndexOfPosition(pc.playerTransform.position, EditorManager.Instance.gameSettings.tileWidth, EditorManager.Instance.gameSettings.tileHeight), TileField.IndexOfPosition(Camera.main.ScreenToWorldPoint(Input.mousePosition), EditorManager.Instance.gameSettings.tileWidth, EditorManager.Instance.gameSettings.tileHeight));
     }
 }
Пример #2
0
 public override void EnterState(PlayerMovementFSM pc)
 {
     pc.ClearPath();
 }