Skip to content
This repository was archived by the owner on Aug 14, 2019. It is now read-only.

Projectile.cs

Erik edited this page Apr 25, 2019 · 7 revisions

Script: Projectile.cs


Dependencies:
  • None
Methods:
  • Launch(Vector2 direction, Sprite _sprite, int _damage, float _falloffTime, int _maxPenetrations, float _speed) - Initializes projectile with the specified parameters and launches it in the Vector2 direction
Public Events:
  • None
Configurable Fields:
  • None
General Overview:

Once a projectile has been created, it is typically placed on a projectile layer to prevent it from causing friendly fire. Note: this is done by configuring the project's Physics2D matrix. The projectile is launched by invoking the Launch(...) method. Object pooling is optional, but recommended. This is especially true in bullet-hell style games.

Clone this wiki locally