developer-assignment-for-softgames
    Preparing search index...

    Card Point Instead of mucking around with nested containers for the card sprites, instead I kept them in one container and used a Card Point to act as a place to move Cards between on-screen.

    Able to keep track of cards assigned to it and send them to other Card Points that stand in for different 'piles' of cards.

    Index

    Constructors

    • Parameters

      • name: string
      • position: Point

        Relative Position based on the Full Size of the Screen

      • parent: Container
      • slideTopCard: boolean = true
      • OptionalbaseZIndex: number

        The base Z Index position to order each card so that different Card Points overlay others

      Returns CardPoint

    Properties

    animationPaused: boolean = false
    attachedCards: Sprite[] = []
    baseZIndex: number = 0
    gamePosition: Point
    name: string = ""
    parent: Container
    position: Point
    slideTopCard: boolean
    topCard: Sprite
    topCardPivotX: number = -60

    Accessors

    Methods

    • Adds a Card Sprite to the Top of the Point

      Parameters

      • sprite: Sprite

        Card added to the Top

      • easeLanding: boolean = false

        Whether or not the top card being shifted over should be tweened

      Returns void

    • Sends the top card of this Point to a new Card Point

      Parameters

      • newCardPoint: CardPoint

        The new Card Point to send to

      • duration: number

        How long the tweened movement takes

      • delay: number = 0

        Delay before the card is sent

      Returns void