shootpkg

package
Version: v0.0.0-...-f1dee3b Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shoot

type Shoot interface {
	GetShootAtTime(CurrentTime time.Time) Shoot
	GetShootObject() *ShootObject
	GetID() int64
	GetPlayerID() int32
	GetX() float32
	GetY() float32
	GetDX() float32
	GetDY() float32

	// Body interface
	GetPoint() shape.Point
}

func NewShoot

func NewShoot(ID int64, playerID int32, x float32, y float32, dx float32, dy float32, startTime time.Time) Shoot

NewShoot returns a new shoot object

type ShootObject

type ShootObject struct {
	ID        int64
	PlayerID  int32
	X         float32
	Y         float32
	DX        float32
	DY        float32
	StartTime time.Time
}

func (*ShootObject) GetDX

func (s *ShootObject) GetDX() float32

func (*ShootObject) GetDY

func (s *ShootObject) GetDY() float32

func (*ShootObject) GetID

func (s *ShootObject) GetID() int64

func (*ShootObject) GetPlayerID

func (s *ShootObject) GetPlayerID() int32

func (*ShootObject) GetPoint

func (s *ShootObject) GetPoint() shape.Point

Body shape

func (*ShootObject) GetShootAtTime

func (s *ShootObject) GetShootAtTime(CurrentTime time.Time) Shoot

GetShootAtTime to get the new position of the shoot at given time

func (*ShootObject) GetShootObject

func (s *ShootObject) GetShootObject() *ShootObject

Consider return the whole object or just partial

func (*ShootObject) GetX

func (s *ShootObject) GetX() float32

func (*ShootObject) GetY

func (s *ShootObject) GetY() float32

Source Files

Jump to

Keyboard shortcuts

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