Here you will find useful public properties you will most likely use and methods you can override.
This is the multi-page printable view of this section. Click here to print.
Scripting Reference
- 1: SolClovser.CaseOpeningToolkit.CaseConfig
- 2: SolClovser.CaseOpeningToolkit.Base.CaseItemBase
- 3: SolClovser.CaseOpeningToolkit.Base.CaseController
1 - SolClovser.CaseOpeningToolkit.CaseConfig
Properties
public List<CaseItemBase> ItemList
Built when the case is first initialized. It is linear, meaning, if you were to open case config and start counting items in all groups top to bottom, it would end up being same with this list.
2 - SolClovser.CaseOpeningToolkit.Base.CaseItemBase
Public Fields
Generic fields that’s common in every item.
public long itemId;
public RawImage itemIcon; // The raw image component that holds the item icon.
public string itemName;
public int itemValue;
Properties
public float ProbabilityInheritedFromGroup
The true probability of the item, inherited from the group it was in.
Methods
Overrideable Methods
public virtual void Setup()
Called during the population process of the case, when the item is instantiated. You can override this to do any setup work in your item. For example; setting the name text of the item.
3 - SolClovser.CaseOpeningToolkit.Base.CaseController
Properties
protected CaseItemBase SelectedItem
Set after the item has been selected. Can be accessed from within child classes.
protected int SelectedItemIndex
Index of the SelectedItem within the built ItemList of config.
Methods
protected void Init()
Initializes the case and populates the visuals of the case.
Overrideable Methods
protected virtual int PickItem()
Selects an item from the case based on probabilities. You can override this in your case controller to change item selection algorithm.
public virtual void OpenCase(bool skipRandomizing = false)
Kicks off the case opening process. Pass true if you want to skip re-populating the case before opening.