Esempio n. 1
0
        public void S_C_RobotGunFire(CMD_SC_Robot_GUN_FIRE _robotGunFire)
        {
            int _chair = (int)_robotGunFire.gsRobotChair;

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

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

            CMD_SC_Robot_GUN_FIRE robotGunFire = GameConvert.ByteToStruct <CMD_SC_Robot_GUN_FIRE>(wByteBuffer, wByteBuffer.Length);

            if (onRobotGunFireEvent != null)
            {
                onRobotGunFireEvent(robotGunFire);
            }
            return(true);
        }