Ejemplo n.º 1
0
 public void Process(ExplorationScene entity, FytInput input)
 {
     if (!entity.GetPartyLeader().Unit.Body.IsMoving())
     {
         entity.StateMachine.ChangeState(ExplorationStates.CALCULATE_PATH);
     }
 }
Ejemplo n.º 2
0
 public void Process(ExplorationScene entity, FytInput input)
 {
     if (entity.IsMoveActionFiredOnUI())
     {
         entity.StateMachine.ChangeState(ExplorationStates.RUN_ACTION);
     }
 }
Ejemplo n.º 3
0
 public void Process(ExplorationUI entity, FytInput input)
 {
     if (input.Tapping())
     {
         Node node = entity.GetMovementNode(input);
         if (node != null)
         {
             entity.SetSelection(node);
             entity.StateMachine.ChangeState(ExplorationUIStates.TRACE_PATH);
         }
     }
 }
Ejemplo n.º 4
0
        public Node GetMovementNode(FytInput input)
        {
            Vector2Int tilePosition = MathUtils.TileVectorFromWorld(input.MouseWorldPosition());

            for (int i = 0; i < movementNodes.Count; i++)
            {
                Node node = movementNodes[i];
                if (node.X == tilePosition.x && node.Y == tilePosition.y)
                {
                    return(node);
                }
            }
            return(null);
        }
Ejemplo n.º 5
0
        public void FytLateUpdate(FytInput input)
        {
            // Set target position
            if (transformTarget != null)
            {
                Vector3 pos = transformTarget.position;
                positionTarget.Set(pos.x, pos.y + PIVOT_OFFSET, pos.z);
            }
            // Lerp
            Vector3 oldPosition = transform.position;
            Vector3 moveTo      = new Vector3(positionTarget.x, positionTarget.y, oldPosition.z);

            transform.position = Vector3.Lerp(oldPosition, moveTo, Alpha);
        }
Ejemplo n.º 6
0
 public void Process(ExplorationUI entity, FytInput input)
 {
     if (input.Tapping())
     {
         Node node = entity.GetMovementNode(input);
         if (node != null)
         {
             if (entity.IsCurrentRetraceNode(node))
             {
                 entity.StateMachine.ChangeState(ExplorationUIStates.FIRE_MOVE_ACTION);
             }
             else
             {
                 entity.SetSelection(node);
                 entity.StateMachine.ChangeState(ExplorationUIStates.TRACE_PATH);
             }
         }
     }
 }
Ejemplo n.º 7
0
 public void Process(FytInput input)
 {
     if (!locked)
     {
         StateMachine.Process(input);
         if (input.Dragging())
         {
             smoothCamera.ResetAlpha();
             smoothCamera.ClearTransformTarget();
             Vector3 dragAmount = input.WorldDragAmount();
             smoothCamera.ChangePositionTarget(-dragAmount.x, -dragAmount.y);
         }
     }
     else
     {
         smoothCamera.Alpha = SmoothCamera.ALPHA_SLOW;
         partyLeader.Unit.Body.ApplyTransformToCamera(smoothCamera);
     }
 }
Ejemplo n.º 8
0
 public void Process(ExplorationUI entity, FytInput input)
 {
 }
Ejemplo n.º 9
0
 public void Process(FytInput input)
 {
     Unit.Body.Update();
 }
Ejemplo n.º 10
0
 public void Process(FytInput input)
 {
     currentState.Process(entity, input);
 }
Ejemplo n.º 11
0
 public void FytLateUpdate(FytInput input)
 {
 }
Ejemplo n.º 12
0
 public void FytUpdate(FytInput input)
 {
     components.Units.Process(input);
     StateMachine.Process(input);
     explorationUI.Process(input);
 }
Ejemplo n.º 13
0
 public void FytEarlyUpdate(FytInput input)
 {
 }