helpers

package
v0.0.0-...-b8d9494 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MatchAnythingComparator

func MatchAnythingComparator(t1, t2 world.ITile) bool

func MatchObstacleComparator

func MatchObstacleComparator(t1, t2 world.ITile) bool

func MatchSameTypeComparator

func MatchSameTypeComparator(t1, t2 world.ITile) bool

func MatchSameTypeOrWalkthroughComparator

func MatchSameTypeOrWalkthroughComparator(t1, t2 world.ITile) bool

func NewBasicHumanoid

func NewBasicHumanoid(name string, i *humanoid.Inventory, baseNodes, customNodes map[entity.DrawSlotId]model.INode) *humanoid.Humanoid

func NewBasicPlatformRoomSet

func NewBasicPlatformRoomSet(o, u, w, h, x func() world.ITile) []*world.Room

func NewBasicStartOrEndRoom

func NewBasicStartOrEndRoom(o, u, w, h, x func() world.ITile) *world.Room

func NewBasicWallRoomSet

func NewBasicWallRoomSet(o, u, w, h, x func() world.ITile) []*world.Room

func NonObstacleOverlapComparator

func NonObstacleOverlapComparator(t1, t2 world.ITile) bool

Good fit for platforms.

Types

type BasicConsumable

type BasicConsumable struct {
	entity.Consumable
	// contains filtered or unexported fields
}

func (*BasicConsumable) Clone

func (e *BasicConsumable) Clone() entity.IItem

func (*BasicConsumable) DroppedNode

func (e *BasicConsumable) DroppedNode() model.INode

func (*BasicConsumable) InventoryNode

func (e *BasicConsumable) InventoryNode() model.INode

func (*BasicConsumable) Node

func (e *BasicConsumable) Node() model.INode

func (*BasicConsumable) SimpleValue

func (e *BasicConsumable) SimpleValue() float32

type BasicConsumableSpecification

type BasicConsumableSpecification struct {
	Name          string
	ItemType      entity.ItemType
	Radius        float32
	ShadowOpacity float32
	Height        float32
	DroppedNode   model.INode
	InventoryNode model.INode
	CountableId   entity.CountableId
	Category      entity.ItemCategory
}

func (*BasicConsumableSpecification) New

type BasicEntity

type BasicEntity struct {
	entity.Entity
	// contains filtered or unexported fields
}

func (*BasicEntity) Node

func (e *BasicEntity) Node() model.INode

type BasicEntitySpecification

type BasicEntitySpecification struct {
	Name          string
	Radius        float32
	ShadowOpacity float32
	Height        float32
	Node          model.INode
}

func (*BasicEntitySpecification) New

type BasicEquipable

type BasicEquipable struct {
	entity.Equipable
	// contains filtered or unexported fields
}

func (*BasicEquipable) Attack

func (e *BasicEquipable) Attack(delta float32, damage float32, position *math32.Vector3, attackAngle, legHeight, handHeight, totalHeight float32, filter entity.Filter) []entity.IAttack

func (*BasicEquipable) Clone

func (e *BasicEquipable) Clone() entity.IItem

func (*BasicEquipable) DroppedNode

func (e *BasicEquipable) DroppedNode() model.INode

func (*BasicEquipable) EquippedNode

func (e *BasicEquipable) EquippedNode() model.INode

func (*BasicEquipable) InventoryNode

func (e *BasicEquipable) InventoryNode() model.INode

func (*BasicEquipable) Node

func (e *BasicEquipable) Node() model.INode

func (*BasicEquipable) SimpleValue

func (e *BasicEquipable) SimpleValue() float32

type BasicEquipableSpecification

type BasicEquipableSpecification struct {
	Name            string
	ItemType        entity.ItemType
	BodyType        entity.BodyType
	Radius          float32
	ShadowOpacity   float32
	Height          float32
	AllowRepeat     bool
	IsTwoHanded     bool
	AttackValue     int
	DefenseValue    int
	AttackGenerator func() *BasicMeleeAttack
	EquippedNode    model.INode
	DroppedNode     model.INode
	InventoryNode   model.INode
	CountableId     entity.CountableId
	ProvidesAmmo    entity.AmmoType
	RequiresAmmo    entity.AmmoType
	Category        entity.ItemCategory
}

func (*BasicEquipableSpecification) New

type BasicHumanoidEquipable

type BasicHumanoidEquipable struct {
	BasicEquipable
	// contains filtered or unexported fields
}

func (*BasicHumanoidEquipable) ArmLeftNode

func (e *BasicHumanoidEquipable) ArmLeftNode() model.INode

func (*BasicHumanoidEquipable) ArmRightNode

func (e *BasicHumanoidEquipable) ArmRightNode() model.INode

func (*BasicHumanoidEquipable) Clone

func (e *BasicHumanoidEquipable) Clone() entity.IItem

func (*BasicHumanoidEquipable) LegLeftNode

func (e *BasicHumanoidEquipable) LegLeftNode() model.INode

func (*BasicHumanoidEquipable) LegRightNode

func (e *BasicHumanoidEquipable) LegRightNode() model.INode

type BasicHumanoidEquipableSpecification

type BasicHumanoidEquipableSpecification struct {
	BasicEquipableSpecification

	ArmRightNode   model.INode
	ArmLeftNode    model.INode
	LegRightNode   model.INode
	LegLeftNode    model.INode
	CoverDrawSlots []entity.DrawSlotId
}

func NewBasicAmulet

func NewBasicAmulet(category entity.ItemCategory, name string, defense int, attack int, main *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicArmor

func NewBasicArmor(category entity.ItemCategory, name string, defense int, main, armLeft, armRight *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicBackpack

func NewBasicBackpack(category entity.ItemCategory, name string, defense int, attack int, main *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicBoots

func NewBasicBoots(category entity.ItemCategory, name string, defense int, legLeft, legRight *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicGloves

func NewBasicGloves(category entity.ItemCategory, name string, defense int, armLeft, armRight *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicHelmet

func NewBasicHelmet(category entity.ItemCategory, name string, defense int, main *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicPants

func NewBasicPants(category entity.ItemCategory, name string, defense int, main, legLeft, legRight *model.NodeSpec) *BasicHumanoidEquipableSpecification

func NewBasicRing

func NewBasicRing(category entity.ItemCategory, name string, defense, attack int, armLeft, armRight *model.NodeSpec) *BasicHumanoidEquipableSpecification

func (*BasicHumanoidEquipableSpecification) New

type BasicItem

type BasicItem struct {
	entity.Item
	// contains filtered or unexported fields
}

func (*BasicItem) Clone

func (e *BasicItem) Clone() entity.IItem

func (*BasicItem) DroppedNode

func (e *BasicItem) DroppedNode() model.INode

func (*BasicItem) InventoryNode

func (e *BasicItem) InventoryNode() model.INode

func (*BasicItem) Node

func (e *BasicItem) Node() model.INode

func (*BasicItem) SimpleValue

func (e *BasicItem) SimpleValue() float32

type BasicItemSpecification

type BasicItemSpecification struct {
	Name          string
	ItemType      entity.ItemType
	Radius        float32
	Height        float32
	DroppedNode   model.INode
	InventoryNode model.INode
	CountableId   entity.CountableId
	ShadowOpacity float32
	Category      entity.ItemCategory
}

func (*BasicItemSpecification) New

type BasicMeleeAttack

type BasicMeleeAttack struct {
	entity.Attack
}

type BasicMeleeAttackSpecification

type BasicMeleeAttackSpecification struct {
	Name          string
	Radius        float32
	ShadowOpacity float32
	MaxWidth      float32
	Reach         float32
	Height        float32
	Y             float32
	Filter        entity.Filter
	// contains filtered or unexported fields
}

func (*BasicMeleeAttackSpecification) New

type EntitySet

type EntitySet struct {
	// contains filtered or unexported fields
}

func NewEntitySet

func NewEntitySet(minAmount, maxAmount int, entityGenerator func() entity.IEntity) *EntitySet

func NewEntitySetCountable

func NewEntitySetCountable(minAmount, maxAmount, minCount, maxCount int, entityGenerator func() entity.IEntity) *EntitySet

type PlacedRoom

type PlacedRoom struct {
	Room   *world.Room
	Coords *world.Coords
}

type WorldGenerator

type WorldGenerator struct {
	// contains filtered or unexported fields
}

func NewWorldGenerator

func NewWorldGenerator(rooms []*world.Room, startRoom *world.Room, endRoom *world.Room, comparator func(world.ITile, world.ITile) bool, connectorTile func() world.ITile) *WorldGenerator

func (*WorldGenerator) Generate

func (g *WorldGenerator) Generate(seed int, tileSize, gravity float32, criticalPathRoomCount, extraRoomCount int, clean bool) (w *world.World, start, end *PlacedRoom, criticalPath, extra []*PlacedRoom)

func (*WorldGenerator) PlaceImportantEntityInRoom

func (g *WorldGenerator) PlaceImportantEntityInRoom(s *game.State, r *PlacedRoom, important entity.IEntity)

func (*WorldGenerator) Populate

func (g *WorldGenerator) Populate(s *game.State, rs []*PlacedRoom, entities []*EntitySet)

func (*WorldGenerator) PopulateRoom

func (g *WorldGenerator) PopulateRoom(s *game.State, r *PlacedRoom, other []entity.IEntity)

Jump to

Keyboard shortcuts

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