Ai
7 Star 27 Fork 2

Gitee 极速下载/goworld

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/xiaonanln/goworld
克隆/下载
ClientSpace.go 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
seis 提交于 2017-08-09 13:41 +08:00 . fixing lint errors
package main
import (
"fmt"
"sync"
"github.com/xiaonanln/goworld/engine/common"
"github.com/xiaonanln/typeconv"
)
// ClientSpace is the space on client
type ClientSpace struct {
sync.Mutex
owner *ClientBot
ID common.EntityID
Kind int
Attrs clientAttrs
destroyed bool
}
func newClientSpace(owner *ClientBot, entityid common.EntityID, data map[string]interface{}) *ClientSpace {
space := &ClientSpace{
owner: owner,
ID: entityid,
Attrs: data,
}
space.Kind = int(typeconv.Int(data["_K"]))
return space
}
func (space *ClientSpace) String() string {
return fmt.Sprintf("ClientSpace<%d|%s>", space.Kind, space.ID)
}
// Destroy the client space
func (space *ClientSpace) Destroy() {
if space.destroyed {
return
}
space.destroyed = true
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/goworld.git
git@gitee.com:mirrors/goworld.git
mirrors
goworld
goworld
v0.1.6

搜索帮助