Documentation
¶
Index ¶
Constants ¶
View Source
const MaxHitBox = 60
Variables ¶
View Source
var (
ATTACK_REPOSITORY = map[string]int{}
)
View Source
var Components = components{ Attack: warehouse.FactoryNewComponent[Attack](), HurtBox: warehouse.FactoryNewComponent[HurtBox](), HurtBoxes: warehouse.FactoryNewComponent[HurtBoxes](), Invincible: warehouse.FactoryNewComponent[Invincible](), Hurt: warehouse.FactoryNewComponent[Hurt](), Health: warehouse.FactoryNewComponent[Health](), Defeat: warehouse.FactoryNewComponent[Defeat](), }
Functions ¶
Types ¶
type Attack ¶
type Attack struct {
Name string
ID int
Boxes [MaxHitBox]HitBoxes `json:"boxes"`
BoxesPositionOffsets [MaxHitBox][MaxHitBox]vector.Two
Length int
StartTick int
Speed int
Damage int
LRDirection spatial.Direction
LastHitTick int
}
func NewAttacksFromJSON ¶
func (*Attack) FirstActiveBoxIndex ¶
func (*Attack) UnmarshalJSON ¶
type AttackCollection ¶
type AttackCollection struct {
Attacks []Attack `json:"attacks"`
}
type AttackSequence ¶
type AttackSequence struct {
Attacks []Attack
}
func NewAttackSeq ¶
func NewAttackSeq(attacks ...Attack) *AttackSequence
func (AttackSequence) First ¶
func (aSeq AttackSequence) First() Attack
type BufferWindow ¶
type BufferWindow struct {
Start, End int
}
type HitBoxPrimitive ¶
type HurtBox ¶
func NewHurtBox ¶
type Invincible ¶
type Invincible struct {
StartTick int
Reason invincibleReason
}
Click to show internal directories.
Click to hide internal directories.