Documentation ¶
Index ¶
- type Square
- func (s *Square) CollisionDetection(w, h float64)
- func (s *Square) CollisionDetection2(w, h float64, board *Square)
- func (s *Square) CollisionDetection3(w, h float64, board *Square)
- func (s *Square) GetScore() string
- func (s *Square) HitDetection(awards *[]*Square)
- func (s *Square) IsAlive() bool
- func (s *Square) Move(w int, step float64, ball *Square)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Square ¶
type Square struct { IsRun bool Image *ebiten.Image Opts *ebiten.DrawImageOptions // contains filtered or unexported fields }
func (*Square) CollisionDetection ¶
func (*Square) CollisionDetection2 ¶
func (*Square) CollisionDetection3 ¶
game.ball = component.NewSquare(define.Red, 5, 5, 300, 390, 3) game.board = component.NewSquare(define.White, 5, 40, 285, 400, 0)
func (*Square) HitDetection ¶
HitDetection 碰撞检测,是否撞击到奖励。撞击到奖励后,奖励消失,分数增加
Click to show internal directories.
Click to hide internal directories.