Beispiel #1
0
    public void SendEndMove()
    {
        PB_C2SClientInput mClientInputs = new PB_C2SClientInput();
        PB_ClientInput    oneInput      = new PB_ClientInput();

        oneInput.InputType = InputType.MoveEnd;
        mClientInputs.Inputs.Add(oneInput);
        _UnityUdpSocket.Send(MsgID.C2SInputInfo, mClientInputs);
        //Debug.Log("SendEndMove=====");
    }
Beispiel #2
0
    public void SendAngleSkill(int inputKey, int tAngle_X, int tAngle_Y)
    {
        PB_C2SClientInput mClientInputs = new PB_C2SClientInput();
        PB_ClientInput    oneInput      = new PB_ClientInput();

        oneInput.InputType = InputType.KeyAngle;
        oneInput.Key       = inputKey;
        oneInput.AngleX    = tAngle_X;
        oneInput.AngleY    = tAngle_Y;
        mClientInputs.Inputs.Add(oneInput);
        _UnityUdpSocket.Send(MsgID.C2SInputInfo, mClientInputs);
    }
Beispiel #3
0
    public void SendInputSkill(int inputKey, InputType inputType, int TargetID)
    {
        PB_C2SClientInput mClientInputs = new PB_C2SClientInput();
        PB_ClientInput    oneInput      = new PB_ClientInput();

        oneInput.InputType = inputType;
        oneInput.Key       = inputKey;
        oneInput.TargetID  = TargetID;
        mClientInputs.Inputs.Add(oneInput);
        _UnityUdpSocket.Send(MsgID.C2SInputInfo, mClientInputs);
        //Debug.Log("SendSkill_1=====");
    }
Beispiel #4
0
 public void SendChangeAngle(int tAngle_X, int tAngle_Y)
 {
     mLsatChangeDirTime += Time.deltaTime;
     if (mLsatChangeDirTime > _ChangeDirIntervalTime)
     {
         PB_ClientInput oneInput = new PB_ClientInput();
         oneInput.InputType = InputType.MoveAngle;
         oneInput.AngleX    = tAngle_X;
         oneInput.AngleY    = tAngle_Y;
         ChangeDirInputs.Inputs.Add(oneInput);
         _UnityUdpSocket.Send(MsgID.C2SInputInfo, ChangeDirInputs);
         //Debug.Log("SendChangeDir=======" + tAngle);
         ChangeDirInputs    = new PB_C2SClientInput();
         mLsatChangeDirTime = 0;
     }
     else
     {
         PB_ClientInput oneInput = new PB_ClientInput();
         oneInput.InputType = InputType.MoveAngle;
         oneInput.AngleX    = tAngle_X;
         oneInput.AngleY    = tAngle_Y;
         ChangeDirInputs.Inputs.Add(oneInput);
     }
 }