TDGageService.cs 1.39 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using FObjBase;
using FLY.Thick.Base.IService;
using FLY.Thick.Base.OBJ_INTERFACE;
using FLY.Thick.Base.Common;
namespace FLY.Thick.Base.Client
{

    public class TDGageService : FObj, ITDGageService
    {
        UInt32 mServerID;
        IFConn mConn;


        public TDGageService()
        {
            mServerID = TDGAGE_OBJ_INTERFACE.ID;

        }
        public void StartP1() 
        {
            CurrObjSys.CallFunctionEx(
                mConn, mServerID, ID, 
                TDGAGE_OBJ_INTERFACE.CALL_StartP1,
                null);
        }
        public void StartP2(STARTP2_MODE mode)
        {
            CurrObjSys.CallFunctionEx(
              mConn, mServerID, ID,
              TDGAGE_OBJ_INTERFACE.CALL_StartP2,
              new TDGAGE_OBJ_INTERFACE.Pack_CallStart2() { order = mode }.ToBytes());       
        }
        public void StartP2(STARTP2_MODE mode, int targetpos) 
        {
            CurrObjSys.CallFunctionEx(
              mConn, mServerID, ID, 
              TDGAGE_OBJ_INTERFACE.CALL_StartP2,
              new TDGAGE_OBJ_INTERFACE.Pack_CallStart2() { order = mode, targetpos = targetpos }.ToBytes());          
        }
        #region IFObj 成员

        public override void ConnectNotify(IFConn from)
        {
            mConn = from;
        }
        #endregion
    }
}