游戏玩法优化

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,8 +22,10 @@ type Gameplay struct {
}
func (slf *Gameplay) GameStart(handle func() error) error {
if err := handle(); err != nil {
return err
if handle != nil {
if err := handle(); err != nil {
return err
}
}
slf.startTime = slf.Time.Now()
slf.OnGameplayStartEvent()