c语言sscanf函数的用法是什么
283
2022-10-17
Bmob云服务端的学习
首先我先说下什么叫Bmob ,我理解为他可以是移动云服务端加数据库。开发小游戏用这个很方便。可以实现用户的登入注册,聊天,计分。非常好用的一个东西
这里是他的官网,他是免费的 ;
记住这个必须绑定
然后我们在这个物体身上加入一个脚本 Bmob Helllo
代码如下:
using UnityEngine;using System.Collections;using cn.bmob.api;public class BmobHelllo : MonoBehaviour{ private BmobUnity Bmob; void Awake () { Bmob = this.GetComponent
然后我们创建一个脚本BmobScore
代码如下:
using UnityEngine;using System.Collections;using cn.bmob.io;public class BmobScore : BmobTable{ //score、playerName、cheatMode是后台数据表对应的字段名称 public BmobInt score { get; set; } public string playerName{ get; set; } //读字段值 public override void readFields (BmobInput input) { base.readFields (input); this.score = input.getInt ("score"); this.playerName=input.getString("playerName"); } //写字段值 public override void write (BmobOutput output, bool all) { base.write (output, all); output.Put ("score", this.score); output.Put("playerName",this.playerName); } }
记住这里我们需要继承下BmobTable 要继承这个类,我们需要把他的库拿过来,using cn.bmob.io;
然后我们回到我们的Bmob里面看下这个数据有没有生成
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~