Skip to content

CCEffectTimed

Inherits CCEffectBase

Public Member Functions

bool

ShouldBeRunning()

Checks if the effect should be running or not, then applies the paused state based on it.

void

SetDuration(int durationTime)

Set the duration of this Timed Effect

Protected Functions

virtual

void

OnEnable()

Ran when the effect is enabled. Can be overridden by a derived class.

virtual

void

OnDisable()

Ran when the effect is disabled. Can be overridden by a derived class.

override

EffectResult

OnTriggerEffect(CCEffectInstance effectInstance)

Handles starting the timed effect. Override OnStartEffect(EffectInstance) instead.

abstract

EffectResult

OnStartEffect(CCEffectInstanceTimed effectInstance)

Invoked when an effect instance is scheduled to start. The effect should only be applied when EffectResult.Success is returned.

abstract

bool

OnStopEffect(CCEffectInstanceTimed effectInstance, bool force)

Invoked when an effect instance is scheduled to stop after its time is expired. Return false if the effect cannot be stopped at the current time to retry in CCEffectBase.retryDelay seconds.

abstract

void

OnPauseEffect()

Invoked when an effect instance is paused.

abstract

void

OnResumeEffect()

Invoked when an effect instance is resumed.

abstract

void

OnResetEffect()

Invoked when an effect instance is reset.

void

Resume(CCEffectInstance effectInstance)

Invoked when the behaviour is resumed.

virtual

bool

RunningCondition()

Conditions to be ran.

Properties

float

Duration

[get, ]

Duration in seconds before the effect is automatically ended.

bool

PausedFromMenu

[get, ]

Is the timer paused from the inspector?

bool

Paused

[get, ]

Is the timer paused?

void

Reset

[, ]

Invoked when the behaviour is Reset.