Documentation ¶
Index ¶
- func InitializeCharacter()
- func NewPlayers() error
- type Player
- func (p *Player) AddTension(num int)
- func (p *Player) BeBlocked(isBlocked bool)
- func (p *Player) Close() error
- func (p *Player) ConsumeStaminaByAttack(num int)
- func (p *Player) Draw(screen *ebiten.Image)
- func (p *Player) DrawSpecialEffect(screen *ebiten.Image)
- func (p *Player) Eat(foodVol int)
- func (p *Player) FinishSpEffect() bool
- func (p *Player) GetHeight() float64
- func (p *Player) GetPosition() *view.Vector
- func (p *Player) GetRectangle() *view.HitRectangle
- func (p *Player) GetScrollVelocity() *view.Vector
- func (p *Player) GetStamina() int
- func (p *Player) GetTension() int
- func (p *Player) InitializeWithLanes(lanes *field.Lanes) error
- func (p *Player) IsAttacked() (bool, *view.HitRectangle, float64)
- func (p *Player) Pause()
- func (p *Player) ReStart()
- func (p *Player) SetInputChecker(laneRectArray []image.Rectangle, ...)
- func (p *Player) Start()
- func (p *Player) StartSpEffect() bool
- func (p *Player) Update()
- func (p *Player) UpdateSpecialEffect()
- type Stamina
- type Tension
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeCharacter ¶ added in v0.0.5
func InitializeCharacter()
Types ¶
type Player ¶
type Player struct { // Specified at creation and not changed StandingImage *ebiten.Image Description string // contains filtered or unexported fields }
Player is a player character.
var ( Kurona *Player Koma *Player Shishimaru *Player // Selected is the selected player. Selected *Player )
player characters
func (*Player) AddTension ¶ added in v0.0.5
func (*Player) BeBlocked ¶ added in v0.0.4
BeBlocked puts the player in a position where the path is blocked by an obstacle.
func (*Player) ConsumeStaminaByAttack ¶ added in v0.0.5
func (*Player) DrawSpecialEffect ¶ added in v0.0.5
func (p *Player) DrawSpecialEffect(screen *ebiten.Image)
func (*Player) FinishSpEffect ¶ added in v0.0.5
func (*Player) GetPosition ¶ added in v0.0.4
GetPosition return the current position of this player.
func (*Player) GetRectangle ¶ added in v0.0.4
func (p *Player) GetRectangle() *view.HitRectangle
GetRectangle returns the edge rectangle of this player.
func (*Player) GetScrollVelocity ¶ added in v0.0.5
GetScrollVelocity returns the velocity to scroll field parts.
func (*Player) GetStamina ¶ added in v0.0.4
GetStamina returns the stamina value fo this character.
func (*Player) GetTension ¶ added in v0.0.5
func (*Player) InitializeWithLanes ¶ added in v0.0.5
InitializeWithLanesInfo sets the lanes information. The player can run on the lane or move between lanes based on the lane drawing height information received in the argument.
func (*Player) IsAttacked ¶ added in v0.0.5
func (p *Player) IsAttacked() (bool, *view.HitRectangle, float64)
func (*Player) SetInputChecker ¶ added in v0.0.5
func (p *Player) SetInputChecker(laneRectArray []image.Rectangle, upBtn, downBtn, atkBtn, spBtn vpad.TriggerButton)
func (*Player) StartSpEffect ¶ added in v0.0.5
func (*Player) Update ¶
func (p *Player) Update()
Update updates the character regarding the user input.
func (*Player) UpdateSpecialEffect ¶ added in v0.0.5
func (p *Player) UpdateSpecialEffect()
type Stamina ¶ added in v0.0.4
type Stamina struct {
// contains filtered or unexported fields
}
Stamina manages the consumption and recovery of stamina.
func NewStamina ¶ added in v0.0.4
NewStamina returns a new stamina engine.
func (*Stamina) Add ¶ added in v0.0.5
Add restores the stamina to the value specified in the argument. However, it will not restore more than the maximum value.
func (*Stamina) ConsumeByAttack ¶ added in v0.0.5
func (*Stamina) ConsumesByState ¶ added in v0.0.5
ConsumesByState encourages a decrease in stamina by the value specified in the argument. The actual stamina is reduced when the consumption is greater than the "endurance". The stamina value does not go below zero.
func (*Stamina) GetStamina ¶ added in v0.0.4
GetStamina returns the current stamina value.
func (*Stamina) Initialize ¶ added in v0.0.4
func (s *Stamina) Initialize()
Initialize initializes stamina engine.
type Tension ¶ added in v0.0.5
type Tension struct {
// contains filtered or unexported fields
}
Tension is the character's tension. If this reaches the max value, the character can shot a special skill.
func NewTension ¶ added in v0.0.5
func (*Tension) AddByAttack ¶ added in v0.0.5
func (*Tension) AddByState ¶ added in v0.0.5
AddByState adds val to tension's val.
func (*Tension) Initialize ¶ added in v0.0.5
func (t *Tension) Initialize()