Fixed a bug with the timer initialization of the invulnerable code. Being lazy and setting it to 0 as a place holder came back to bite me lol.
This commit is contained in:
		| @@ -50,7 +50,7 @@ class Enemy(Object): | ||||
|         self.hasVulnerabilitySystem = kwargs.get('has_vulnerability', False) | ||||
|         if self.hasVulnerabilitySystem: | ||||
|             self.isVulnerable = kwargs.get('is_vulnerable', False)  # For enemies with vulnerability, default to invulnerable | ||||
|             self.vulnerabilityTimer = 0 | ||||
|             self.vulnerabilityTimer = pygame.time.get_ticks() | ||||
|             self.vulnerabilityDuration = kwargs.get('vulnerability_duration', 1000) | ||||
|             self.invulnerabilityDuration = kwargs.get('invulnerability_duration', 5000) | ||||
|         else: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user