Skip to content

CCEffectBidWar

SilicDev edited this page Feb 21, 2024 · 1 revision

CCEffectBidWar

Class: CCEffectBidWar

An effect that is a bid war

Description

Bid War effects are active for the entire session. The currently active effect will be whatever has the highest amount of coins bid to it. While several functions to edit the bid entries for an effect are provided it's highly discouraged to edit these at runtime. However plugins may elect to use this for automated setup of effects in the editor.

Methods

type signature
void add_entry(name: String)
void clear()
String get_entry_id(idx: int) const
int get_entry_idx(id: String) const
String get_entry_name(idx: int) const
Texture2D get_entry_icon(idx: int) const
Color get_entry_tint(idx: int) const
Dictionary get_winner() const
bool place_bid(id: String, amount: int)
void remove_entry(idx: int)
void set_entry_id(idx: int, id: String)
void set_entry_name(idx: int, name: String)
void set_entry_icon(idx: int, icon: Texture2D)
void set_entry_tint(idx: int, tint: Color)

Method Descriptions

void add_entry(name: String) : Adds a new bid entry to this effect.

void clear() : Removes all bid entries from this effect.

String get_entry_id(idx: int) const : Gets the internal id for the bid entry idx.

int get_entry_idx(id: String) const : Gets the internal idx for the bid entry from its internal id.

String get_entry_name(idx: int) const : Gets the name for the bid entry idx.

Texture2D get_entry_icon(idx: int) const : Gets the icon for the bid entry idx.

Color get_entry_tint(idx: int) const : Gets the color tint for the bid entry idx.

Dictionary get_winner() const : Returns the data of the option that currently has the highest bid.

bool place_bid(id: String, amount: int) : Places a bid on option id with amount coins.

void remove_entry(idx: int) : Removes the entry at idx bid entries from this effect.

void set_entry_id(idx: int, id: String) : Sets the internal id for the bid entry idx.

void set_entry_name(idx: int, name: String) : Sets the name for the bid entry idx.

void set_entry_icon(idx: int, icon: Texture2D) : Sets the icon for the bid entry idx.

void set_entry_tint(idx: int, tint: Color) : Sets the color tint for the bid entry idx.

Clone this wiki locally