func (c *Creature) init() { c.visibleCreatures = make(interfaces.CreatureMap) c.movementSpeed = 250 c.lastStep = interfaces.PUSYS_TIME() }
// Methods for all moving creatures func (c *Creature) OnCreatureMove(_creature interfaces.ICreature, _from position.Position, _to position.Position, _teleport bool) { if _creature.GetUID() == c.GetUID() { c.lastStep = interfaces.PUSYS_TIME() } }
func (c *Creature) getTimeSinceLastMove() int { return int(interfaces.PUSYS_TIME() - c.lastStep) }