Example #1
0
        public void S_C_GunFire(CMD_SC_GF_GUN_FIRE _gunFire)
        {
            int _chair = (int)_gunFire.gsChair;

            if (CanonCtrl.Instance.singleCanonList[_chair] != null)
            {
                CanonCtrl.Instance.singleCanonList[_chair].S_C_FakePly_GunFire(_chair, (float)_gunFire.gsRot, (float)_gunFire.gsZ, (float)_gunFire.gsY, (int)_gunFire.gsSsrverId, (int)_gunFire.gsCostVal, _gunFire.gsServerTime);
            }
        }
        private bool DidGunFire(int wHandleCode, byte[] wByteBuffer, int wDataSize)
        {
            int dataLen = wByteBuffer.Length;

            if (dataLen < wDataSize)
            {
                Debug.LogError("User join in data Error!!");
                return(false);
            }

            CMD_SC_GF_GUN_FIRE gunFire = GameConvert.ByteToStruct <CMD_SC_GF_GUN_FIRE>(wByteBuffer, wByteBuffer.Length);

            if (onGunFireEvent != null)
            {
                onGunFireEvent(gunFire);
            }

            return(true);
        }