Пример #1
0
    public void GenerateEmployee(EmployeeInfoVO employeeVO)
    {
        //设置出生点和消失点
        int     bornPointIndex = Random.Range(0, 4);
        Vector3 bornPoint      = bornPoints[bornPointIndex].transform.position;
        Vector3 disappearPoint = disappearPoints[bornPointIndex].transform.position;

        GameObject  employee    = CatPool.GetInstance().GetCatPool(employeeVO.Id).CreateObject(bornPoint);
        EmployeeCtl employeeCtl = employee.AddComponent <EmployeeCtl>();

        employeeCtl.bornPosition      = bornPoint;
        employeeCtl.disappearPosition = disappearPoint;
        EmployeeInfo employeeInfo = employee.AddComponent <EmployeeInfo>();

        employeeInfo.Id        = employeeVO.Id;
        employeeInfo.Name      = employeeVO.Name;
        employeeInfo.Level     = employeeVO.Level;
        employeeInfo.Evo       = employeeVO.Evo;
        employeeInfo.Iq        = employeeVO.Iq;
        employeeInfo.Atk       = employeeVO.Atk;
        employeeInfo.React     = employeeVO.React;
        employeeInfo.Skill     = employeeVO.Skill;
        employeeInfo.About     = employeeVO.About;
        employeeInfo.Hireprice = employeeVO.HirePrice;
    }
Пример #2
0
    public void AddEmployeeModel(int cattypeid)
    {
        ManorInfoProxy manorInfoProxy = Facade.RetrieveProxy(ManorInfoProxy.NAME) as ManorInfoProxy;

        Temp_EmployeeInfoData = new EmployeeInfoVO(
            cattypeid,
            manorInfoProxy.catDic[cattypeid].Name,
            manorInfoProxy.catDic[cattypeid].Level,
            manorInfoProxy.catDic[cattypeid].Evo,
            manorInfoProxy.catDic[cattypeid].Iq,
            manorInfoProxy.catDic[cattypeid].Atk,
            manorInfoProxy.catDic[cattypeid].React,
            manorInfoProxy.catDic[cattypeid].Skill,
            manorInfoProxy.catDic[cattypeid].About,
            manorInfoProxy.catDic[cattypeid].HirePrice
            );
        Facade.SendNotification(EmployeeMediator.GENERATE_EMPLOYEE, Temp_EmployeeInfoData);
    }