예제 #1
0
    void onClick_BtnAI_Btn(GameObject caster)
    {
        Client.IControllerSystem cs = Client.ClientGlobal.Instance().GetControllerSystem();
        if (cs == null)
        {
            Engine.Utility.Log.Error("ExecuteCmd: ControllerSystem is null");
            return;
        }

        Client.ICombatRobot robot = cs.GetCombatRobot();
        if (robot.Status == Client.CombatRobotStatus.STOP)
        {
            ComBatCopyDataManager comBat = DataManager.Manager <ComBatCopyDataManager>();
            if (comBat.IsEnterCopy && comBat.EnterCopyID != 0)
            {
                robot.StartInCopy(comBat.EnterCopyID, comBat.LaskSkillWave, comBat.LastTransmitWave);
            }
            else
            {
                robot.Start();
            }
        }
        else
        {
            robot.Stop();
        }
    }
예제 #2
0
 /// <summary>
 /// 开启挂机
 /// </summary>
 void StartRobot()
 {
     Client.IControllerSystem cs = Client.ClientGlobal.Instance().GetControllerSystem();
     if (cs != null)
     {
         Client.ICombatRobot robot = cs.GetCombatRobot();
         if (robot != null) //&& robot.Status != Client.CombatRobotStatus.STOP)
         {
             robot.Start();
         }
     }
 }