Result of trying to trigger an effect. Determines the reply sent back to the server.
|
Success |
The effect executed successfully. |
|
Failure |
The effect failed to trigger but is still available for use. Viewer(s) will be refunded. |
|
Unavailable |
Same as Failure but the effect is no longer available for use. |
|
Retry |
The effect cannot be triggered right now, try again in a few seconds. |
|
Queue |
INTERNAL USE ONLY. The effect has been queued for execution after the current one ends. |
|
Running |
INTERNAL USE ONLY. The effect triggered successfully and is now active until it ends. |
The Crowd Control client instance. Handles communications with the server and triggering effects.
|
Connect () |
void |
Connects to the Crowd Control server. |
|
Disconnect () |
void |
Disconnects from the Crowd Control server. |
|
HasRunningEffects () |
bool |
Returns true if at least one timed effect is currently running. |
|
IsRunning (CCEffectTimed type) |
bool |
Returns true if timed effect is running. |
|
StopOne (CCEffectTimed type) |
bool |
Stops a timer effect |
|
StopAllEffects () |
void |
Forcefully terminates all pending and running effects. |
|
IsPaused (CCEffectTimed type) |
bool |
Returns true if timed effect is paused |
|
ToggleEffectSellable (uint effectID, bool sellable) |
void |
Toggles whether an effect can currently be sold during this session. |
|
ToggleEffectVisible(uint effectID, bool visible) |
bool |
Toggles whether an effect is visible in the menu during this session. |
|
SubmitTempToken(string token) |
void |
Submits Temporary Token to the server. Server gives response. |
|
EnableEffect (CCEffectTimed effect) |
void |
Resume a timed effect. |
|
DisableEffect (CCEffectTimed effect) |
void |
Disable a timed effect. |
|
ResetEffect (CCEffectTimed effect) |
void |
Reset a timed effect. |
|
Pause (CCEffectInstanceTimed effectInstance) |
void |
Pauses a timer effect. |
|
Resume (CCEffectInstanceTimed effectInstance) |
void |
Resumes a timer command |
|
Reset (CCEffectInstanceTimed effectInstance) |
void |
Resets a timer command |
|
TestEffect (CCEffectTimed effect) |
void |
Test an effect locally. Its events won't be sent to the server. |
|
CancelEffect (CCEffectInstanceTimed effectInstance) |
void |
Cancels a received effect |
|
ccEffectEntries |
CCEffectEntries |
A list of effect IDs associated with the game. |
|
delayBetweenEffects |
float |
Client is starting |
|
isConnected |
bool |
Client is connected |
|
instance[get] |
CrowdControl |
Singleton instance. Will be null if the behavior isn't in the scene. |
|
testUser [get] |
TwitchUser |
Reference to the test user object. Used to dispatch local effects. |
|
crowdUser [get] |
TwitchUser |
Reference to the crowd user object. Used to dispatch pooled effects. |
|
isAuthenticated [get] |
bool |
Whether the game is authenticated or not. |
|
isConnecting [get] |
bool |
Whether the connection to the server is currently initializing. |
|
OnConnecting |
Action |
Invoked when attempting a connection to the Crowd Control server. |
|
OnConnectionError |
Action |
Invoked when the connection to the Crowd Control server has failed. |
|
OnAuthenticated |
Action |
Invoked when you have been authenticated. |
|
OnConnected |
Action |
Invoked when successfully connected to the Crowd Control server. |
|
OnDisconnected |
Action |
Invoked when disconnected from the Crowd Control server. |
|
OnGameStarted (IN PROGRESS) |
Action |
Invoked when the game has begun. |
|
OnGameStopped (IN PROGRESS) |
Action |
Invoked when the game has stopped. |
|
OnGameReset (IN PROGRESS) |
Action |
Invoked when the game has reset. |
|
OnEffectQueue |
Action< CCEffectInstance > |
Invoked when an effect is scheduled for execution. |
|
OnEffectDequeue |
Action< CCEffectInstance, EffectResult > |
Invoked when an effect leaves the scheduling queue. |
|
OnEffectTrigger |
Action< CCEffectInstance > |
Invoked when an CCEffectBase is successfully triggered. |
|
OnEffectStart |
Action< CCEffectInstanceTimed > |
Invoked when a CCEffectTimed is successfully started. |
|
OnEffectStop |
Action< CCEffectInstanceTimed > |
Invoked when a CCEffectTimed is successfully stopped. |
|
OnEffectPause |
Action< CCEffectInstanceTimed > |
Invoked on effect instances when the associated CCEffectTimed is disabled. |
|
OnEffectResume |
Action< CCEffectInstanceTimed > |
Invoked on effect instances when the associated CCEffectTimed is enabled. |
|
OnEffectReset |
Action< CCEffectInstanceTimed > |
Invoked on effect instances when the associated CCEffectTimed is reset. |
Information about a Twitch user profile.
|
id |
ulong |
Unique Twitch user identifier. |
|
name |
string |
Unique Twitch user name. Always lowercase. |
|
displayName |
string |
Pretty printed user name. |
|
profileIconUrl |
string |
URL to download the profile icon from. |
|
profileIcon |
bool |
Profile icon downloaded into a 2D texture. Can be null . |
|
profileIconColor = Color.white |
bool |
Color to tint the profile icon's background with. |
A database entry of a Crowd Control Effect.
|
id |
uint |
Internal ID for this effect. |
|
className |
string |
Which class does this effect use? |
A database of every Crowd Control Effect that can be used on this game.
|
this[] |
CCEffectEntry |
Retrieve an effect based on it's ID. |
|
Count |
int |
How many effects does the game have? |
Basic Crowd Control effect properties.
|
identifier |
uint |
Unique identifier of the effect. |
|
displayName |
string |
Name of the effect displayed to the users. |
|
description |
string |
Information about the effect, displayed in the extension. |
|
icon |
Sprite |
Image to display in the CrowdControl Twitch extension and in the onscreen overlay. |
|
iconColor |
Color |
Color used to tint the effect's icon. |
|
maxRetries = 3 |
int |
Number of retries before the effect instance fails. |
|
retryDelay = 5.0 |
float |
Delay in seconds before retrying to trigger an effect instance. |
|
pendingDelay = .5f |
float |
Delay in seconds to wait before triggering the next effect instance. |
|
virtual PayloadSize (string userName) |
ushort |
Byte size of the playload for this effect. Can be overridden by a derived class. |
|
string |
Additional Info for the effect. Can be overridden by a derived class. |
Inherits from: CCEffectBase
A single-trigger effect with no extra properties.
A Crowd Control effect that handles parameters.
|
AddParameters (params object[] prms) |
void |
Function for dynamically adding object(s) to the parameter list. |
|
ClearParameters () |
void |
Clearing the established parameter list. |
|
override PayloadSize (string userName) |
ushort |
Size of the payload for this effect. Derived from CCEffectBase |
|
override Params () |
string |
All Parameters for this effect as a string. Derived from CCEffectBase |
|
virtual AssignParameters (string[] prms) |
void |
Used for processing the newly received parameter array. |
Inherits from: CCEffectBase
Base effect for bid war effects.
|
override PayloadSize (string userName) |
void |
Size of the playload for this effect. Derived from CCEffectBase. |
|
override Params () |
string |
All Parameters for this effect as a string. Derived from CCEffectBase. |
|
AssignTint (string bidName) |
void |
Retrieve the tint associated with what's being bid and apply it to the icon. |
|
bidFor |
string |
Name of what the user is bidding towards. |
|
cost |
uint |
How many coins will be bid towards bidFor |
|
iconTints |
List< CCEffectBidWarTint> |
A list of tints to be applied to the icon based on if there's a new bid winner. |
The name of a bid paired up with a tint to apply for Bid War notifications.
|
bidName |
string |
Name of this entry. |
|
tint |
Color |
Color to tint the icon into when bidName is the winning bid. |
Keeps information of all of the bids for this play session.
|
PlaceBid (string id, uint amount) |
bool |
Place a bid for an option. Returns true if the item sent in ends up being the highest and a different ID than the previous winner. |
A Crowd Control effect active for a given duration of time.
|
Fill |
Time is represented by a graphical fill |
|
Timer |
Time is represented by a string (X:XX) |
|
duration = 60 |
float |
Duration in seconds before the effect is automatically ended. |
|
displayType |
CCEffectTimed.DisplayType |
Whether the timer displays text or a fill graphic. |
|
virtual OnEnable () |
void |
Ran when the effect is enabled. |
|
virtual OnDisable () |
void |
Ran when the effect is disabled. |
|
paused |
bool |
Returns true if the timer is paused. |
A CCEffect Instance used to trigger in game. The instance is only valid from the time the effect is requested up to the time the effect is successfully triggered or failed.
|
isTest |
bool |
When true, the effect executes locally without talking to the server. |
|
id [get, set] |
uint |
Unique identifier of this instance, shared with the server. ID value are never reused. |
|
effect [get, set] |
CCEffectBase |
Target effect behavior containing the logic. |
|
effectID [get] |
uint |
The id for the effect that's being used |
|
parameters [get, set] |
string[] |
The parameters sent into the effect. Eg: Item Type, Quantity |
|
user [get, set] |
TwitchUser |
The Twitch user who triggered the effect. |
|
retryCount [get, set] |
float |
How many times has the effect returned EffectResult.Retry when trying to start the instance. |
|
unscaledStartTime [get, set] |
int |
Unscaled game time when the effect was triggered. |
State of a Time-Based Crowd Control effect. The instance is valid from the time the effect is requested and lives until the effect is successfully stopped or failed.
|
isActive |
bool |
Whether the effect instance is active. true when the related Effect behavior is enabled. |
|
isPaused |
bool |
Whether the effect instance is paused or not. |
|
effect [get, set] |
CCEffectTimed |
Reference to the target timed effect. |
|
unscaledEndTime [get, set] |
float |
Unscaled game time when the timed effect will end. Updated on resume. |
|
unscaledTimeLeft [get, set] |
float |
Unscaled game time left to execute. |
Inherits from: Stream
Handles sending and receiving byte streams from the server.
|
override Seek (long offset, SeekOrigin origin) |
long |
|
|
override Read (byte[] buffer, int offset, int count) |
int |
|
|
override Write (byte[] buffer, int offset, int count) |
void |
|
|
override SetLength (long value) |
void |
|
|
override Flush () |
void |
|
|
override CanSeek |
bool |
|
|
override CanRead |
bool |
|
|
override CanWrite |
bool |
|
|
override Length |
long |
|
|
override Dispose |
void |
|
|
override Position |
long |
|