Projectile Class

Summary

A component which uses trigger messages to PlatformerGameKit.Hit things.
Assembly
PlatformerGameKit.dll
Namespace
PlatformerGameKit
Base Types
  • MonoBehaviour
graph BT Type-->Base0["MonoBehaviour"] Type["Projectile"] class Type type-node

Syntax

[AddComponentMenu(Strings.MenuPrefix + "Projectile")]
[PlatformerHelpUrl(typeof(Projectile))]
public class Projectile : MonoBehaviour

Remarks

Documentation: Ranged Attacks

Attributes

Type Description
AddComponentMenu
PlatformerHelpUrlAttribute [Assert-Conditional] A UnityEngine.HelpURLAttribute which points to Platformer Game Kit's documentation.

Properties

Name Value Summary
Damage int
Direction Vector2
Force float
Ignore HashSet<Hit.ITarget>
ImpactAnimation SoloAnimation
Lifetime float
Renderer SpriteRenderer
Rigidbody Rigidbody2D
Team Team

Methods

Name Value Summary
Fire(Vector2, Team, int, float, HashSet<Hit.ITarget>) void
Launches this projectile.
Fire(Vector2, Team, int, float, Vector2, HashSet<Hit.ITarget>) void
Launches this projectile.
OnValidate() void
[Editor-Only] Ensures that all fields have valid values and finds missing components nearby.