Documentation ¶
Overview ¶
Copyright 2014 loolgame Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2014 loolgame Author. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player struct { Session gate.Session Rid string //角色ID userid SitDown bool //是否已坐下 ,如果网络断开会设置为false,当网络连接成功以后需要重新坐下 NetBroken int64 //网络中断时间,超过60秒就踢出房间或者做其他处理 单位/秒 LastRequestDate int64 //玩家最后一次请求时间 单位纳秒 X float64 Y float64 Wid int XSpeed float64 YSpeed float64 RotateDirection int // rotate direction: 1-clockwise, 2-counterclockwise BallRadius float64 Angle float64 Power float64 RotateSpeed int DegToRad float64 MinPower float64 MaxPower float64 }
func (*Player) OnNetBroken ¶
func (self *Player) OnNetBroken()