void InitEvent() { CSPersonnel.RegisterOccupaChangedListener(OnOccupationChange); for (int i = 0; i < m_ProItems.Length; i++) { m_ProItems[i].e_JionEvent += OnJionin; m_ProItems[i].e_DoubleClickEvent += OnDoubleClick; } }
void Awake() { m_Type = CSConst.CreatorType.Managed; m_CommonEntities = new Dictionary <int, CSCommon>(); m_MainNpcs = new List <CSPersonnel>(); m_RandomNpcs = new List <CSPersonnel>(); CSPersonnel.RegisterStateChangedListener(OnPersonnelChangeState); CSPersonnel.RegisterOccupaChangedListener(OnPersonnelChangeOccupation); CSPersonnel.RegisterWorkTypeChangedListener(OnPersonnelChangeWorkType); // Init Timer m_Timer = new PETimer(); }
public void Init() { CSPersonnel.RegisterOccupaChangedListener(OnOccupationChange); }
void Awake() { CSPersonnel.RegisterOccupaChangedListener(OnOccupationChanged); }