Beispiel #1
0
        public void HandleBreakage(EntityUid owner)
        {
            var eventArgs = new BreakageEventArgs();

            RaiseLocalEvent(owner, eventArgs, false);
            var breakActs = EntityManager.GetComponents <IBreakAct>(owner).ToList();

            foreach (var breakAct in breakActs)
            {
                breakAct.OnBreak(eventArgs);
            }
        }
Beispiel #2
0
        public void HandleBreakage(IEntity owner)
        {
            var eventArgs = new BreakageEventArgs
            {
                Owner = owner,
            };
            var breakActs = owner.GetAllComponents <IBreakAct>().ToList();

            foreach (var breakAct in breakActs)
            {
                breakAct.OnBreak(eventArgs);
            }
        }