void bulletMsgToDict() { bulletMsg[0] = new returnBulletMsg(); bulletMsg[1] = new returnBulletMsg(); bulletMsg[2] = new returnBulletMsg(); bulletMsg[3] = new returnBulletMsg();//四个炮台的子弹信息 BulletMsg.Add(0, bulletMsg[0]); BulletMsg.Add(1, bulletMsg[1]); BulletMsg.Add(2, bulletMsg[2]); BulletMsg.Add(3, bulletMsg[3]); }
/// <summary> /// 下面三个为捕鱼开炮返回信息,返回给所有人 /// </summary> /// <param name="o"></param> public void do20006(object o) { //Debug.Log("收到了20006信息"); // Debug.Log("-><color=#9400D3>" + "服务器接收到的总金币数" + "</color>" + ((JsonData)o)["sumGold"].ToString()); if (((JsonData)o)["fire"]["userId"].ToString() == httpView.id) { GameController.lastBulletFire = true; } returnBulletMsg r = new returnBulletMsg(); r._id = ((JsonData)o)["fire"]["id"].ToString(); r._gold = (int)(((JsonData)o)["useGold"]); r._angle = double.Parse((((JsonData)o)["fire"]["angle"].ToString())); r._bulletLevel = (int)(((JsonData)o)["fire"]["level"]); r.user = ((JsonData)o)["fire"]["userId"].ToString(); r._SumGold = ((JsonData)o)["sumGold"].ToString(); GameController.returnBullet.Add(r); //GameController.Instance.openFire(((JsonData)o)["fire"]["id"].ToString(), (int)(((JsonData)o)["useGold"]), double.Parse((((JsonData)o)["fire"]["angle"].ToString())), ((JsonData)o)["fire"]["userId"].ToString(), (int)(((JsonData)o)["fire"]["level"]));//返回子弹信息,并告诉可以发射 }