DoopelPonger
|
The main code that controls Schmitty Doop. It's a bit too long and should be refactored. More...
Public Member Functions | |
void | Awake () |
Initialize all references and values needed by Schmitty Doop. More... | |
void | Reset () |
Reset the state of Schmitty Doop like it is brand new. More... | |
void | FixedUpdate () |
Change the color of Schmitty Doop after being hit and take care of the action patterns. More... | |
bool | IsHidden () |
void | TakeDamage (float damage, Vector2 pushDirection) |
Apply damage to Schmitty Doop. More... | |
void | TakeDamage (float damage, Vector2 pushDirection, Vector2 hitPosition) |
Apply damage to Schmitty Doop. Providing the hitPosition will make the smallRipplePrefab spawn to distort the how Schmitty Doop is drawn. More... | |
Public Attributes | |
Transform | leftEarLocation |
Transform | rightEarLocation |
Transform | mouthLocation |
CoopAbstractActionPatternProvider | actionPatternProvider |
Range | delayBeforeNextAttack |
CoopSchmittyDoopCollider [] | colliders |
CoopFlashSpriteRenderer [] | flashSpriteRenderers |
float | flashDelay |
float | flashRate |
int | numberOfFlashes |
Color | flashColor |
SmallRipple | smallRipplePrefab |
float | maxDamage |
float | maxHealth |
CoopSchmittyDoopMaterialWrapper [] | materialWrappers |
The main code that controls Schmitty Doop. It's a bit too long and should be refactored.
This class contains the locations of spawning bullets, getting patterns for movement/attacking, taking damage, and controlling the color when hit.
void CoopSchmittyDoop.Awake | ( | ) |
Initialize all references and values needed by Schmitty Doop.
void CoopSchmittyDoop.FixedUpdate | ( | ) |
Change the color of Schmitty Doop after being hit and take care of the action patterns.
bool CoopSchmittyDoop.IsHidden | ( | ) |
void CoopSchmittyDoop.Reset | ( | ) |
Reset the state of Schmitty Doop like it is brand new.
void CoopSchmittyDoop.TakeDamage | ( | float | damage, |
Vector2 | pushDirection | ||
) |
Apply damage to Schmitty Doop.
damage | The amount of damage to apply |
pushDirection | The direction the projectile hitting Schmitty Doop is moving, this direction is the direction that Schmitty Doop will move after the damage has been applied. |
void CoopSchmittyDoop.TakeDamage | ( | float | damage, |
Vector2 | pushDirection, | ||
Vector2 | hitPosition | ||
) |
Apply damage to Schmitty Doop. Providing the hitPosition will make the smallRipplePrefab spawn to distort the how Schmitty Doop is drawn.
damage | The amount of damage to apply |
pushDirection | The direction the projectile hitting Schmitty Doop is moving, this direction is the direction that Schmitty Doop will move after the damage has been applied. |
hitPosition | The exact position wher Schmitty Doop was hit, in world coordinates. |
CoopAbstractActionPatternProvider CoopSchmittyDoop.actionPatternProvider |
Class that will give Schmitty Dooop actions to perform. With the introduction of downloading files from the StreamingAssets directory for WebGL builds, this pattern provider should be initialized before SchmittyDoop uses it.
CoopSchmittyDoopCollider [] CoopSchmittyDoop.colliders |
The colliders that make up schmitty doop. In this class they are activated/deactived when Schmitty Doop turns visible/invisible from the movement action.
Range CoopSchmittyDoop.delayBeforeNextAttack |
Wait time Schmitty doop will wait after an action pattern is finished and before starting the next one.
Color CoopSchmittyDoop.flashColor |
The color Schmitty Doop should flash when hit.
float CoopSchmittyDoop.flashDelay |
float CoopSchmittyDoop.flashRate |
How fast the flashSpriteRenderers should change to flashColor
CoopFlashSpriteRenderer [] CoopSchmittyDoop.flashSpriteRenderers |
The renderers used to draw Schmitty Doop. In this class they are used to trigger the color flashes when Schmitty Doop gets hit.
Transform CoopSchmittyDoop.leftEarLocation |
Position bullets should spawn out of the left ear.
CoopSchmittyDoopMaterialWrapper [] CoopSchmittyDoop.materialWrappers |
Schmitty Doop will become black and white the lower its health gets. The materialWrappers are the limbs of Schmitty Doop that will have their color changed to black and white.
float CoopSchmittyDoop.maxDamage |
All damage done to Schmitty Doop is a ratio of the maxDamage. For example a powerful attack my do 3/4 * maxDamaga where a weak attack may only do 1/6 * maxDamage. MaxDamage is also used to calculate how much movement should be added to Schmitty Doop when hit. The closer to the maxDamage that is delt, the more Schmitty Doop will be knocked in that direction.
float CoopSchmittyDoop.maxHealth |
Max health Schmitty Doop should start with.
Transform CoopSchmittyDoop.mouthLocation |
Position bullets should spawn out of the mouth.
int CoopSchmittyDoop.numberOfFlashes |
The number of times Schmitty Doop should flash when hit.
Transform CoopSchmittyDoop.rightEarLocation |
Position bullets should spawn out of the right ear.
SmallRipple CoopSchmittyDoop.smallRipplePrefab |
Prefab for the shader that distorts Schmitty Doop when hit.