Пример #1
0
 /// <summary>
 /// 清除所有角色
 /// </summary>
 public void Clear()
 {
     for (int i = 0; i < m_Actors.Count; i++)
     {
         L_Actor actor = m_Actors[i];
         GameObject.Destroy(actor);
     }
 }
Пример #2
0
        /// <summary>
        /// 移除角色
        /// </summary>
        /// <param name="id">角色ID.</param>
        public void Remove(uint id)
        {
            L_Actor actor = Find(id);

            if (actor != null)
            {
                m_Actors.Remove(actor);
            }
        }
Пример #3
0
        //
        public override void OnStart()
        {
            IsReceive = false;
            uint seatid = GetComponent <L_Character_Drinker> ().SeatID;

            seat = L_ActorManager.It.Find(seatid);
            GameEventMachine.SendEvent(GameEventID.Event_Drinker_CallBarman, gameObject, seat.gameObject);

            GameEventMachine.Register(GameEventID.Event_Barman_Tend, OnBarmanTend);
        }
Пример #4
0
        /// <summary>
        /// 查找角色
        /// </summary>
        /// <param name="id">角色ID</param>
        public L_Actor Find(uint id)
        {
            L_Actor actor = null;

            for (int i = 0; i < m_Actors.Count; i++)
            {
                actor = m_Actors[i];
                if (actor.ID == id)
                {
                    break;
                }
            }
            return(actor);
        }
Пример #5
0
 /// <summary>
 /// 添加角色
 /// </summary>
 /// <param name="actor">Actor.</param>
 public uint Add(L_Actor actor)
 {
     m_IDCounter++;
     m_Actors.Add(actor);
     return(m_IDCounter);
 }