Skip to content

Shooting Enemy

Andrew Hernandez edited this page Jul 6, 2026 · 6 revisions

System Summary

The Shooting Enemy fires a projectile in a given direction consistently while in play mode, the projectiles fired damage the player if touched.


Connected Systems

Connecting Systems:


Bugs

  • None

Feature List / Breakdown of Features

Shooting:

  • The enemy fires a projectile in the direction indicated.
  • If the projectile makes contact with the player, it harms them.
  • If the projectile makes contact with a tile, it gets deleted.
  • If the projectile leaves the screen, it gets deleted.
  • If enabled, the player can bounce on projectiles.

Important Variables

  • direction: float = What direction the enemy fires in in degrees, starting on the positive x-axis and moving clockwise.
  • shotSpeed: float = How fast the projectiles travel.
  • fireRate: float = How fast the enemy fires.
  • gravityOn: bool = If gravity applies to the enemy.
  • projBounce: bool = Whether the projectiles can be bounced on by the player.
  • random: bool = If the enemy fires in random direction instead of a determined one.

Important Functions

  • func shooting_behavior() -> void: Fires the projectile on an interval.

Future Work / Risks

Future Work:

  1. Option for toggleable invulnerability on these enemies
  2. A visual difference between bouncy and normal bullets

Miscellaneous Notes

A place for miscellaneous notes pertaining to this system.

  • None

Clone this wiki locally