游戏玩法优化

This commit is contained in:
kercylan98 2023-05-11 15:01:12 +08:00
parent 9667eec16b
commit 47f2267918
1 changed files with 4 additions and 2 deletions

View File

@ -22,9 +22,11 @@ type Gameplay struct {
} }
func (slf *Gameplay) GameStart(handle func() error) error { func (slf *Gameplay) GameStart(handle func() error) error {
if handle != nil {
if err := handle(); err != nil { if err := handle(); err != nil {
return err return err
} }
}
slf.startTime = slf.Time.Now() slf.startTime = slf.Time.Now()
slf.OnGameplayStartEvent() slf.OnGameplayStartEvent()
return nil return nil