components

package
v0.0.0-...-7f3c8ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DamageType

type DamageType int
const (
	PhysicalDamage DamageType = iota
	FireDamage
	WaterDamage
	EarthDamage
	AirDamage
	ElectricDamage
	PsychicDamage
	NecroticDamage
	RadiantDamage
	EntropicDamage
)

type Mob

type MobComponent

type MobComponent struct {
	Health ResourceBarComponent
	SpatialComponent
}

func (*MobComponent) GetMobComponent

func (mc *MobComponent) GetMobComponent() *MobComponent

type MobComponentInterface

type MobComponentInterface interface {
	GetMobComponent() *MobComponent
}

type Pack

type Pack struct {
	ecs.BasicEntity
	RenderComponent
}

type PackComponent

type PackComponent struct {
	Modifiers []PackModifier
	Members   []ecs.IdentifierSlice
}

type PackModifier

type PackModifier struct {
	HPFlat      int     // directly added to HP
	HPMult      float64 // multiplied
	ManaFlat    int
	ManaMult    float64
	Resistances map[DamageType]float64
	Buffs       map[string]func() // the signature of this func is really critical but i have to skeleton out the rest of this dinkle doink to find out
}

type PlayerComponent

type PlayerComponent struct {
	Name   string
	Health ResourceBarComponent
	Mana   ResourceBarComponent
}

func (*PlayerComponent) GetPlayerComponent

func (pc *PlayerComponent) GetPlayerComponent() *PlayerComponent

type PlayerComponentInterface

type PlayerComponentInterface interface {
	GetPlayerComponent() *PlayerComponent
}

type RenderComponent

type RenderComponent struct {
	Vis     bool
	Type    RenderType
	Payload map[string]string
}

func (*RenderComponent) GetRenderComponent

func (rc *RenderComponent) GetRenderComponent() *RenderComponent

type RenderComponentInterface

type RenderComponentInterface interface {
	GetRenderComponent() *RenderComponent
}

type RenderType

type RenderType int
const (
	RenderPlayer RenderType = iota
	RenderMob
	RenderItem
	RenderScene
	RenderTransition
)

type ResourceBarComponent

type ResourceBarComponent struct {
	Total int
	Max   int
	Regen float64
}

func (*ResourceBarComponent) ResourceBarComponent

func (hc *ResourceBarComponent) ResourceBarComponent() *ResourceBarComponent

func (ResourceBarComponent) String

func (hc ResourceBarComponent) String() string

type ResourceBarComponentInterface

type ResourceBarComponentInterface interface {
	GetResourceBarComponent() *ResourceBarComponent
}

type SpatialComponent

type SpatialComponent struct {
	X int
	Y int
}

func (*SpatialComponent) SpatialComponent

func (sc *SpatialComponent) SpatialComponent() *SpatialComponent

type SpatialComponentInterface

type SpatialComponentInterface interface {
	GetSpatialComponent() *SpatialComponent
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL