remove demo game

This commit is contained in:
2026-05-25 21:28:17 +02:00
parent b1ea3447a8
commit 76f910ab36
75 changed files with 115 additions and 815 deletions

52
scene.hotspot.go Normal file
View File

@@ -0,0 +1,52 @@
package pncdsl
type CursorKind int
const (
CursorDefault CursorKind = iota
CursorLook
CursorUse
CursorTalk
CursorTake
CursorExit
)
type Hotspot struct {
Name string
Area Shape
Label string
Cursor CursorKind
OnLook Action
OnUse Action
OnTalk Action
OnTake Action
OnGive Action
// OnUseWith: when the player has an item selected and clicks this hotspot,
// the engine looks up the item's Name here first.
OnUseWith map[string]Action
// OnVerb: custom verbs registered via g.VerbManager.
OnVerb map[string]Action
}
// handler returns the action bound to verb v for this hotspot, or nil.
func (h Hotspot) handler(v string) Action {
switch v {
case "look":
return h.OnLook
case "use":
return h.OnUse
case "talk":
return h.OnTalk
case "take":
return h.OnTake
case "give":
return h.OnGive
}
if h.OnVerb != nil {
return h.OnVerb[v]
}
return nil
}