Basic system and window creation.

This commit is contained in:
Marvin Blum
2016-05-03 21:03:00 +02:00
parent 4266942d2f
commit 05013370fd
4 changed files with 195 additions and 1 deletions

28
actor.go Normal file
View File

@@ -0,0 +1,28 @@
package goga
import ()
// An actor ID is a unique integer,
// which can be used to reference an actor.
type ActorId uint64
// A basic actor, having a unique ID.
// Use NewActor() to create new actors.
type Actor struct {
id ActorId
}
var (
actorIdGen = ActorId(0)
)
// Creates a new basic actor with unique ID.
func NewActor() *Actor {
actorIdGen++
return &Actor{actorIdGen}
}
// Returns the ID of actor.
func (a *Actor) GetId() ActorId {
return a.id
}