Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class CardPile3D

    Represents a pile of cards in 3D space.

    Inheritance
    object
    CardPile3D
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.UI
    Assembly: PopcorningGuineaPig.Engine.dll
    Syntax
    public class CardPile3D

    Constructors

    | Edit this page View Source

    CardPile3D(Vector3, Vector3, float)

    Creates a new card pile.

    Declaration
    public CardPile3D(Vector3 position, Vector3 rotation, float cardSpacing = 0.01)
    Parameters
    Type Name Description
    Vector3 position

    The position of the pile

    Vector3 rotation

    The rotation of the pile

    float cardSpacing

    The spacing between cards in the pile

    Methods

    | Edit this page View Source

    AddCard(Card3D, bool)

    Adds a card to the pile.

    Declaration
    public void AddCard(Card3D card, bool animate = true)
    Parameters
    Type Name Description
    Card3D card

    The card to add

    bool animate

    Whether to animate the card moving to the pile

    | Edit this page View Source

    Draw(Camera3D)

    Draws the pile.

    Declaration
    public void Draw(Camera3D camera)
    Parameters
    Type Name Description
    Camera3D camera

    The camera to use for rendering

    | Edit this page View Source

    DrawCard(bool)

    Draws a card from the top of the pile.

    Declaration
    public Card3D? DrawCard(bool animate = true)
    Parameters
    Type Name Description
    bool animate

    Whether to animate the card being drawn

    Returns
    Type Description
    Card3D

    The card that was drawn, or null if the pile is empty

    | Edit this page View Source

    GetCardCount()

    Gets the number of cards in the pile.

    Declaration
    public int GetCardCount()
    Returns
    Type Description
    int

    The number of cards

    | Edit this page View Source

    GetPosition()

    Gets the position of the pile.

    Declaration
    public Vector3 GetPosition()
    Returns
    Type Description
    Vector3

    The position

    | Edit this page View Source

    IsPointOver(Vector2, Camera3D)

    Checks if a point in screen space is over the pile.

    Declaration
    public bool IsPointOver(Vector2 screenPoint, Camera3D camera)
    Parameters
    Type Name Description
    Vector2 screenPoint

    The point in screen space

    Camera3D camera

    The camera used for rendering

    Returns
    Type Description
    bool

    True if the point is over the pile, false otherwise

    | Edit this page View Source

    Shuffle()

    Shuffles the cards in the pile.

    Declaration
    public void Shuffle()
    | Edit this page View Source

    Unload()

    Unloads the card models in the pile.

    Declaration
    public void Unload()
    | Edit this page View Source

    Update(float)

    Updates the pile.

    Declaration
    public void Update(float deltaTime)
    Parameters
    Type Name Description
    float deltaTime

    The time elapsed since the last update

    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.