Пример #1
0
        public void SendEventToAllActors(TOALL_EVENT_TYPE etype, MapEventArgs args, Actor sActor, bool sendToSourceActor)
        {
            foreach (Actor actor in this.actorsByID.Values)
            {
                if(sActor != null) if (!sendToSourceActor && (actor.ActorID == sActor.ActorID)) continue;

                switch (etype)
                {
                    case TOALL_EVENT_TYPE.CHAT:
                        actor.e.OnActorChat(sActor, args);
                        break;
                    default:
                        break;
                }
            }
        }
Пример #2
0
        public void SendEventToAllActors(TOALL_EVENT_TYPE etype, MapEventArgs args, Actor sActor, bool sendToSourceActor)
        {
            foreach (Actor actor in this.actorsByID.Values)
            {
                if(sActor != null) if (!sendToSourceActor && (actor.id == sActor.id)) continue;

                switch (etype)
                {
                    case TOALL_EVENT_TYPE.CHAT:
                        actor.e.OnActorChat(sActor, args);
                        break;

                    case TOALL_EVENT_TYPE.UPDATE_TIME_AND_WEATHER:
                        actor.e.OnTimeWeatherChange(this.gTime.GetTime(), this.weather);
                        break;

                    default:
                        break;
                }
            }
        }