Skip to content

CardBack

Divided by Zer0 edited this page Mar 9, 2022 · 6 revisions

CardBack

Extends: Panel

Description

Property Descriptions

viewed_node

var viewed_node

This varialbe should hold the path to the node which is handling the way the card is viewed.

is_viewed_visible

var is_viewed_visible: bool
  • Setter: set_is_viewed_visible

This varialbe should hold the path to the node which is handling the way the card is viewed. This bool will be set to true when we want to signify that the card is viewed while face down.

card_owner

var card_owner

Stores a reference to the Card that is hosting this node

Method Descriptions

set_is_viewed_visible

func set_is_viewed_visible(value: bool) -> void

This function can be overriden by any class extending CardBack to implement their own way of signifying a viewed face-down card

If a card back does not include a viewed_node definition,this function will just show a warning.

start_card_back_animation

func start_card_back_animation() -> void

Each class which extends this has to overwrite this function with the one specific to its needs

This is the generic function that will be called when the card back is visible to the player

stop_card_back_animation

func stop_card_back_animation() -> void

Each class which extends this has to overwrite this function with the one specific to its needs

This is the generic function that will be called when the card back stops being visible to the player.

scale_to

func scale_to(_scale_multiplier: float) -> void

This is used to scale the card back when the card back is shown in the focus viewport.

Override it according to the requirements of your card back

Clone this wiki locally