Documentation ¶
Overview ¶
Package core provides core functionality for a simulation:
- combat
- tasks
- event handling
- logging
- constructs (really should be just generic objects?)
- status
Index ¶
- Constants
- func RegisterCharFunc(char keys.Char, f NewCharacterFunc)
- func RegisterSetFunc(set keys.Set, f NewSetFunc)
- func RegisterWeaponFunc(weap keys.Weapon, f NewWeaponFunc)
- type Coord
- type Core
- func (c *Core) AddChar(p profile.CharacterProfile) (int, error)
- func (c *Core) Init() error
- func (c *Core) QueueAttack(a combat.AttackInfo, p combat.AttackPattern, snapshotDelay int, dmgDelay int, ...)
- func (c *Core) QueueAttackEvent(ae *combat.AttackEvent, dmgDelay int)
- func (c *Core) QueueAttackWithSnap(a combat.AttackInfo, s combat.Snapshot, p combat.AttackPattern, dmgDelay int, ...)
- func (c *Core) QueueParticle(src string, num float64, ele attributes.Element, delay int)
- func (c *Core) SetupOnNormalHitEnergy()
- func (c *Core) Tick()
- type CoreOpt
- type Flags
- type NewCharacterFunc
- type NewSetFunc
- type NewWeaponFunc
- type Reactable
Constants ¶
View Source
const MaxTeamSize = 4
Variables ¶
This section is empty.
Functions ¶
func RegisterCharFunc ¶
func RegisterCharFunc(char keys.Char, f NewCharacterFunc)
func RegisterSetFunc ¶
func RegisterSetFunc(set keys.Set, f NewSetFunc)
func RegisterWeaponFunc ¶
func RegisterWeaponFunc(weap keys.Weapon, f NewWeaponFunc)
Types ¶
type Core ¶
type Core struct { F int Flags Flags Seed int64 Rand *rand.Rand //various functionalities of core Log glog.Logger //we use an interface here so that we can pass in a nil logger for all except 1 run Events *event.Handler //track events: subscribe/unsubscribe/emit Status *status.Handler Tasks *task.Handler Combat *combat.Handler Constructs *construct.Handler Player *player.Handler }
func (*Core) QueueAttack ¶ added in v1.0.0
func (c *Core) QueueAttack( a combat.AttackInfo, p combat.AttackPattern, snapshotDelay int, dmgDelay int, callbacks ...combat.AttackCBFunc, )
func (*Core) QueueAttackEvent ¶ added in v1.0.0
func (c *Core) QueueAttackEvent(ae *combat.AttackEvent, dmgDelay int)
func (*Core) QueueAttackWithSnap ¶ added in v1.0.0
func (c *Core) QueueAttackWithSnap( a combat.AttackInfo, s combat.Snapshot, p combat.AttackPattern, dmgDelay int, callbacks ...combat.AttackCBFunc, )
func (*Core) QueueParticle ¶ added in v1.0.0
func (*Core) SetupOnNormalHitEnergy ¶ added in v1.0.0
func (c *Core) SetupOnNormalHitEnergy()
type NewCharacterFunc ¶
type NewCharacterFunc func(core *Core, char *character.CharWrapper, p profile.CharacterProfile) error
type NewSetFunc ¶
type NewWeaponFunc ¶
type NewWeaponFunc func(core *Core, char *character.CharWrapper, p weapon.WeaponProfile) (weapon.Weapon, error)
type Reactable ¶ added in v1.0.0
type Reactable interface { React(a *combat.AttackEvent) AuraContains(e ...attributes.Element) bool AuraType() attributes.Element Tick() }
Directories ¶
Path | Synopsis |
---|---|
Package action describes the valid actions that any character may take
|
Package action describes the valid actions that any character may take |
Package combat handles all combat related functionalities including
|
Package combat handles all combat related functionalities including |
Package player contains player related tracking and functionalities: - tracking characters on the team - handling animations state - handling normal attack state - handling character stats and attributes - handling shielding
|
Package player contains player related tracking and functionalities: - tracking characters on the team - handling animations state - handling normal attack state - handling character stats and attributes - handling shielding |
animation
package animation provides a simple way of tracking the current animation state at any given frame, as well as if the current frame is in animation lock or not
|
package animation provides a simple way of tracking the current animation state at any given frame, as well as if the current frame is in animation lock or not |
shield
Package shield provide a handler to keep track of shields and add shields etc...
|
Package shield provide a handler to keep track of shields and add shields etc... |
Click to show internal directories.
Click to hide internal directories.