Skip to content
Dima Marhitych edited this page Oct 23, 2023 · 1 revision

Api to entity module

Import it like this:

import (
    "github.com/dimkauzh/vertex/src/entity"
)

Structs

type Entity struct {
  Pos    vector.Vector2D
  Width  float32
  Height float32
  Rect   *shape.Rect
}

Functions

func NewEntity(x, y, width, height float32) -> Entity
func (e *Entity) NewRect(x, y, width, height float32, color [3]float32)
// Deprecated: Won't be supported and will be deleted soon
func (e *Entity) SetRectColor(color [3]float32)
Clone this wiki locally