shape

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: 0 Imported by: 0

Documentation

Overview

package shape is to define shape interface of game object to handle object collision proper

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Circle

type Circle struct {
	X      float32
	Y      float32
	Radius float32
}

func (Circle) NextPosition

func (c Circle) NextPosition(dx float32, dy float32) Circle

NextPosition returns a circle which is the predicted circle if player move in dx, dy direction

type Point

type Point struct {
	X float32
	Y float32
}

type Rect

type Rect struct {
	X1 float32
	Y1 float32
	X2 float32
	Y2 float32
}

Source Files

Jump to

Keyboard shortcuts

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