overlap detection
parent
bfb399d89d
commit
87fa287fa3
@ -0,0 +1,43 @@
|
||||
package sim
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/jordanorelli/blammo"
|
||||
)
|
||||
|
||||
type door struct {
|
||||
*blammo.Log
|
||||
}
|
||||
|
||||
func (d *door) update(time.Duration) {}
|
||||
|
||||
func (d *door) onStartOverlap(e *entity) {
|
||||
d.Info("start overlap: %v", e)
|
||||
}
|
||||
|
||||
func (d *door) onOverlap(e *entity) {
|
||||
d.Info("overlap: %v", e)
|
||||
}
|
||||
|
||||
func (d *door) onStopOverlap(e *entity) {
|
||||
d.Info("stop overlap: %v", e)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
┌──────────┐
|
||||
│··········│
|
||||
│··········│
|
||||
│··········│ ┌──────┐
|
||||
│··········│ │ │
|
||||
│··········│ │ │
|
||||
│·····d····◇░░░░░░░░◇ │
|
||||
│··········│ │ │
|
||||
│··········│ │ │
|
||||
│··········│ └──────┘
|
||||
│··········◇
|
||||
└──────────┘
|
||||
|
||||
*/
|
Loading…
Reference in New Issue