public void SendEvent <ParamType>(GameSkillEventDef _event, PoolObjHandle <ActorRoot> _src, ref ParamType _param, GameSkillEventChannel _channel = 0) { if (_src != 0) { if (_channel == GameSkillEventChannel.Channel_HostCtrlActor) { if (ActorHelper.IsHostCtrlActor(ref _src)) { this.SendEvent <ParamType>(_event, ref _param); } } else if (_channel == GameSkillEventChannel.Channel_HostActor) { if (ActorHelper.IsHostActor(ref _src)) { this.SendEvent <ParamType>(_event, ref _param); } } else if (_channel == GameSkillEventChannel.Channel_AllActor) { this.SendEvent <ParamType>(_event, ref _param); } } }
public void SendEvent <ParamType>(GameSkillEventDef _event, PoolObjHandle <ActorRoot> _src, ref ParamType _param, GameSkillEventChannel _channel = GameSkillEventChannel.Channel_HostCtrlActor) { if (!_src) { return; } if (_channel == GameSkillEventChannel.Channel_HostCtrlActor) { if (ActorHelper.IsHostCtrlActor(ref _src) || Singleton <WatchController> .GetInstance().IsWatching) { this.SendEvent <ParamType>(_event, ref _param); } } else if (_channel == GameSkillEventChannel.Channel_HostActor) { if (ActorHelper.IsHostActor(ref _src) || Singleton <WatchController> .GetInstance().IsWatching) { this.SendEvent <ParamType>(_event, ref _param); } } else if (_channel == GameSkillEventChannel.Channel_AllActor) { this.SendEvent <ParamType>(_event, ref _param); } }