Underpants, PlayerAbility, PlayerBuff, SuperPower
Last updated
Last updated
Underpants is a prefab that modifies Player's ability, by applying PlayerAbility
component.
Each underpants is one prefab that consist of
UnderpantsConfig
a derivative of PlayerAbility
component.
some other supporting component.
PlayerAbility
is a component of underpants, that upon Initialize()
is called, modifies some aspect of Player
or its sub-components.
Example :
AddJumpChargeAbility
will simply adds some jumpCharge
to Player.
BouncyAbility
will modify DefaultVehicle
's behaviour when touching the ground so it will appear "bouncy".
PlayerAbility
is PASSIVE, meaning that there's no expiry and will not be destroyed. This is the main difference with PlayerBuff
PlayerBuff
is a prefab, that upon Initialize()
is called, modifies some aspect of Player
or its sub-components.
PlayerBuff
is ACTIVE, meaning that each buff will have some expiry rules. After the expiry rules has been met, the PlayerBuff
is removed.
Example :
CoinPerSecondBuff
adds a fixed amount of coins per second. removed after certain duration.
SlowImmunityBuff
will make Player immune to Slow
effect coming from Soldiers. removed after getting certain amount of hits.
Super Power is a new mechanic in RR, that will activate when user collects a Super Power Orb.
Upon hitting Super Power Orb, SuperPowerController
will Construct a new Power and activates it.
The orb will carry a SuperPowerConfig
that described what type of superpower and its details.
SuperPowerConfig
has two types, Vehicle
and Buff
. Therefore, based on the type, SuperPowerController
will construct a Vehicle
or create PlayerBuff
accordingly.