Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add CardMovementComponent -Add states, but they don't do anything yet. Just lerp to desired position -Replace LerpComponent on Card scene * Change CardContainer and CardWorld to Control Change from Node2D to Control, this way we can anchor the CardContainer to the bottom of the screen * Add card draw/discard queue system Cards now draw and discard in a queue. To remove or draw a card, it is first added to a queue. Queued cards get removed/added from the queue on a looping timer -Cards are removed from draw pile immediately when a draw is requested. They are added to the queue so they can be spawned async -Cards are added to the discard pile immediately when a discard is requested. They are added to the queue to be destroyed async. This means that cards technically exist in the draw/discard immediately when the request is given, but the world versions of the cards may spawn/destroy at a later time. * Add CardMovementState resource -Add CardMovementState as a Resource. So each state will be a separate file -Added child states InHand, MovingToHand, and Discarding -Added CardState properties which gives values for the card states -Added EasingConstants which is string constants used for easing * Add better card separation Cards now separate based on a max and min value. Cards will squish closer together if there are a lot of cards in your hand. If you only have a small amount of cards in your hand, they will be centered * Fix z-ordering of cards Cards are moved to the top of the hierarchy if they are hovered. This makes it to where cards below this card can't be hovered. * Other cards scoot out of the way when you hover one When you hover a card, other cards in your hand scoot out of the way to give room for the hovered card * Add y-offset and rotation curve to cards in hand * Add HOVERED and QUEUED states * Remove state switch in CardContainer * Smooth rotation Hover and Queued states * Organize state values. Fix MOVING_TO_HAND state MOVING_TO_HAND state was not easing to the correct position * Fix offset in QUEUED * Move discard and draw timers Moved timers to the end of the draw queue functions so the cards aren't discarded and drawn with a starting delay * Naming cleanup. Fix weird movement with discarding state * Fix movement issue with focus card Focus card not getting set to null when played * Ease rotation on discarding state * Bind input only when the card is finished moving * Restrict end turn button press Only allow when cards are finished dealing and you have no card queued * Static typing and cleanup * Fix tests by adding on_cards_finished_dealing Wait for cards to finish dealing before checking cards in test_cards Removed PhaseManager.on_game_start check in test_health because the tests would never start. Since test_health isn't the first test anymore it never recieved the signal. Wasn't needed anyways * Change CardStateProperties to Resource instead of Node * Further commenting and cleanup * Issue-25: Update naming for _state_not_null(), clean up readability for pulling card to start discard animation * Issue-25: Rename LERP_SPEED to MOVE_SPEED for readability, added active_cards array to determine if all active cards are done doing their action * Issue-12: Update active_cards from an array to just a single CardWorld object --------- Co-authored-by: tynutsathitya <[email protected]>
- Loading branch information