DoopelPonger
Public Member Functions | Public Attributes | List of all members
CoopSchmittyDoop Class Reference

The main code that controls Schmitty Doop. It's a bit too long and should be refactored. More...

Inheritance diagram for CoopSchmittyDoop:
Inheritance graph
[legend]
Collaboration diagram for CoopSchmittyDoop:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ Awake()

void CoopSchmittyDoop.Awake ( )

Initialize all references and values needed by Schmitty Doop.

◆ FixedUpdate()

void CoopSchmittyDoop.FixedUpdate ( )

Change the color of Schmitty Doop after being hit and take care of the action patterns.

◆ IsHidden()

bool CoopSchmittyDoop.IsHidden ( )
Returns
True if Schmitty Doop is invisible.

◆ Reset()

void CoopSchmittyDoop.Reset ( )

Reset the state of Schmitty Doop like it is brand new.

◆ TakeDamage() [1/2]

void CoopSchmittyDoop.TakeDamage ( float  damage,
Vector2  pushDirection 
)

Apply damage to Schmitty Doop.

Parameters
damageThe amount of damage to apply
pushDirectionThe direction the projectile hitting Schmitty Doop is moving, this direction is the direction that Schmitty Doop will move after the damage has been applied.

◆ TakeDamage() [2/2]

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.

Parameters
damageThe amount of damage to apply
pushDirectionThe direction the projectile hitting Schmitty Doop is moving, this direction is the direction that Schmitty Doop will move after the damage has been applied.
hitPositionThe exact position wher Schmitty Doop was hit, in world coordinates.

Member Data Documentation

◆ actionPatternProvider

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.

◆ colliders

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.

◆ delayBeforeNextAttack

Range CoopSchmittyDoop.delayBeforeNextAttack

Wait time Schmitty doop will wait after an action pattern is finished and before starting the next one.

◆ flashColor

Color CoopSchmittyDoop.flashColor

The color Schmitty Doop should flash when hit.

◆ flashDelay

float CoopSchmittyDoop.flashDelay

◆ flashRate

float CoopSchmittyDoop.flashRate

How fast the flashSpriteRenderers should change to flashColor

◆ flashSpriteRenderers

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.

◆ leftEarLocation

Transform CoopSchmittyDoop.leftEarLocation

Position bullets should spawn out of the left ear.

◆ materialWrappers

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.

◆ maxDamage

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.

◆ maxHealth

float CoopSchmittyDoop.maxHealth

Max health Schmitty Doop should start with.

◆ mouthLocation

Transform CoopSchmittyDoop.mouthLocation

Position bullets should spawn out of the mouth.

◆ numberOfFlashes

int CoopSchmittyDoop.numberOfFlashes

The number of times Schmitty Doop should flash when hit.

◆ rightEarLocation

Transform CoopSchmittyDoop.rightEarLocation

Position bullets should spawn out of the right ear.

◆ smallRipplePrefab

SmallRipple CoopSchmittyDoop.smallRipplePrefab

Prefab for the shader that distorts Schmitty Doop when hit.


The documentation for this class was generated from the following file: