[Header("元素预制体")] //显示在面板上
[Tooltip("透明边界预制体")]//鼠标放在面板信息上会有注
public GameObject bgElement;
客户端发给服务器 Peer.OpCustom
服务器端接收事件 OnOperationRequest
服务器端发送事件SendOperationResponse
客户端接收事件OnOperationResponse
服务器端推送事件SendEvent
客户端接收推送OnEvent
transaction = session.BeginTransaction();//开启事务
其中有一个事务添加失败将会回滚整套事务全都无效
注意关闭顺序 最后打开的最先关闭
4.5到5.0版本,部分组件使用被启用。
rigidbody
renderer
light
解决方法
start里面先获得
GetComponent<Rigidbody>()
private Rigidbody rgd;
void Start(){
rgd=GetComponent<Rigidbody>();
}
rgd.AddForce
<property name="dialect">NHibernate.Dialect.MySQL5Dialect</property><!--数据库版本-->
无论你的Mysql是8.0还是5.0都要写5,或者不写大坑谨记。
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
main activity》unity
screen Match mode->Match width or Haighy
Input.GetMouseButtonDown(0)
注释是进行一个鼠标抬起(按下?)的判断
Observable.EveryUpdate().Where()
unity是以米为单位
按住肯处键是以米为单位拖动的
transform.Translate(transform.forward * Time.deltaTime, Space.Self);
首先transform.forward是当前物体的物体坐标系的z轴在世界坐标系上的指向,那么就是系统根据物体本身的局部坐标计算出的世界坐标!!!,但是如果你用了Space.Self,需要的是局部坐标,那么你的transform.forward就会再次被转换成局部坐标。所以就造成了,如果你物体旋转度是30,transform.forward就是30度的方向,然后,transform.forward在计算成局部坐标就会变成再+30度,所以看起来就是世界坐标的60度方向移动。
为什么这么慢,看不了啊啊
.安卓sid
创建Common是请创建Framwork版本,防止后期unity不兼容
1.public override void HandleGameAciton(UIPanelType currentGamePanelType){if(currentGamePanelType==UIPanelType.WolfPanel){}else{if(nextPanel!null){
nextPanel.HandleGameAction(currentGamePanelType);}}}
2.protected override void OnInitPanel(){base.OnInitPanel();
killNumber=contentPane.GetChild("Tex_KillNumber").asTextField;
numberButtons=contentPane.GetChild("Group_KillNumber").asGroup;
transition=contentPane.GetTransition("t0");
killTransition=contentPane.GetTransition("t1");
for(int i=0;i<contentPane.numChildren;i++){
GButton gButton=contentPane.GetChildAt(i).asButton;
gButton.onClick.Add(()=>{
killNumber.text=gButton.title.ToString();messageManager.wolfKillNumber=System.Convert.ToInt32(gButton.title);});}}
WolfPanel脚本
定义成员变量
GTextField killNumber,GGroup numberButtons,Transition killTransition
找不到Manager可以刷新解决方案,可以不必关闭VS
WolfPanel脚本
1.OnInitPanel函数添加
certainButton.onClick.Add(()=>{
controller.selectedIndex=2;
messageController.selectedIndex=2;
transition.Stop();
killTransition.Play(()=>{
killNumber.text=0.ToString();
AfterAction(UIPanelType.witchPanel);});});
2.HandleGameAction(UIPanelType currentGamePanelType){
if(currentGamePanelType==UIPanelType.WolfPanel){
ToCurrentPanel();transition.Play(-1,0,()=>{});
for((int i=0;i<contentPane.numChildren;i++){
for(int j=0;j<messageManager.deadPlayerNum.Count;j++)
{
if(contentPane.GetChildAt(i).group==numberButtons){GButton gButton=contentPane.GetChildAt(i).asButton;
if(gButton.title==messageManager.deadPlayerNum[j].ToString()){
gButton.grayed=true;gButton.touchable=false;}
}}}}}