Hit Struct

Summary

The details of a hit.
Assembly
PlatformerGameKit.dll
Namespace
PlatformerGameKit
Base Types
  • ValueType
graph BT Type-->Base0["ValueType"] Type["Hit"] class Type type-node

Syntax

public struct Hit : ValueType

Remarks

Documentation: Hits

Constructors

Name Summary
Hit(Transform, Team, int, float, Vector2, ICollection<Hit.ITarget>) Creates a new PlatformerGameKit.Hit with the specified details.

Fields

Name Constant Value Summary
damage
The amount of damage this hit will deal.
direction
The direction in which the PlatformerGameKit.Hit.force is applied.
force
The amount of knockback force applied to the object being hit.
ignore
Objects that cannot be hit.
source
The object causing this hit.
target
The object being hit.
team
The PlatformerGameKit.Team that the PlatformerGameKit.Hit.source is on.

Methods

Name Value Summary
CanHit(Component, bool) bool
Can the `component` be hit by the Current?
CanHit(GameObject, bool) bool
Can the `gameObject` be hit by the Current?
GetTarget(Component) Hit.ITarget
Calls UnityEngine.Component.GetComponentInParent``1.
static
GetTarget(GameObject) Hit.ITarget
Calls UnityEngine.GameObject.GetComponentInParent``1.
static
ToString() string
TryHit(Hit.ITarget, bool) bool
Calls PlatformerGameKit.Hit.ITarget.ReceiveHit(PlatformerGameKit.Hit@) if the `target` can be hit by the Current.
TryHitComponent(Component, bool) bool
Calls PlatformerGameKit.Hit.GetTarget(UnityEngine.Component) and PlatformerGameKit.Hit.TryHit(PlatformerGameKit.Hit.ITarget,System.Boolean).
TryHitComponents(Component[], bool) void
Calls PlatformerGameKit.Hit.TryHitComponent(UnityEngine.Component,System.Boolean) on each of the `targets`.
TryHitComponents(Component[], int, bool) void
Calls PlatformerGameKit.Hit.TryHitComponent(UnityEngine.Component,System.Boolean) on each of the `targets`.