Add Init,Update,Destroy to Comp+HasComp,DestroyComp funcs

This commit is contained in:
bloeys
2022-12-06 06:07:49 +04:00
parent 84cd8c28c8
commit b025afe1b4
6 changed files with 73 additions and 30 deletions

View File

@ -1,12 +1,15 @@
package assert
import (
"fmt"
"github.com/bloeys/nmage/consts"
"github.com/bloeys/nmage/logging"
)
func T(check bool, msg string) {
func T(check bool, msg string, args ...any) {
if consts.Debug && !check {
logging.ErrLog.Panicln("Assert failed:", msg)
logging.ErrLog.Panicln("Assert failed:", fmt.Sprintf(msg, args...))
}
}