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
- Variables
- func RegisterCharFunc(char keys.Char, f NewCharacterFunc)
- func RegisterSetFunc(set keys.Set, f NewSetFunc)
- func RegisterWeaponFunc(weap keys.Weapon, f NewWeaponFunc)
- type Core
- func (c *Core) AddChar(p info.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() error
- type Flags
- type NewCharacterFunc
- type NewSetFunc
- type NewWeaponFunc
- type Opt
- type Reactable
Constants ¶
View Source
const MaxTeamSize = 4
Variables ¶
View Source
var (
NewCharFuncMap = make(map[keys.Char]NewCharacterFunc)
)
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 ¶
func (c *Core) QueueAttack( a combat.AttackInfo, p combat.AttackPattern, snapshotDelay int, dmgDelay int, callbacks ...combat.AttackCBFunc, )
func (*Core) QueueAttackEvent ¶
func (c *Core) QueueAttackEvent(ae *combat.AttackEvent, dmgDelay int)
func (*Core) QueueAttackWithSnap ¶
func (c *Core) QueueAttackWithSnap( a combat.AttackInfo, s combat.Snapshot, p combat.AttackPattern, dmgDelay int, callbacks ...combat.AttackCBFunc, )
func (*Core) QueueParticle ¶
func (*Core) SetupOnNormalHitEnergy ¶
func (c *Core) SetupOnNormalHitEnergy()
type NewCharacterFunc ¶
type NewCharacterFunc func(core *Core, char *character.CharWrapper, p info.CharacterProfile) error
type NewSetFunc ¶
type NewWeaponFunc ¶
type NewWeaponFunc func(core *Core, char *character.CharWrapper, p info.WeaponProfile) (info.Weapon, error)
type Reactable ¶
type Reactable interface { React(a *combat.AttackEvent) AuraContains(e ...attributes.Element) bool 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 |
Code generated by "pipeline"; DO NOT EDIT.
|
Code generated by "pipeline"; DO NOT EDIT. |
Package combat handles all combat related functionalities including
|
Package combat handles all combat related functionalities including |
Code generated by "pipeline"; DO NOT EDIT.
|
Code generated by "pipeline"; DO NOT EDIT. |
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.