public HostSupportComponent(IEntityLogger logger, IPlatformSupport platformSupport, HumanoidNPCGameComponentContext internalContext, IWorldCoreGameComponentContext worldContext)
     : base(logger)
 {
     _internalContext     = internalContext;
     _worldContext        = worldContext;
     _invokerInMainThread = worldContext.InvokerInMainThread;
     _platformSupport     = platformSupport;
 }
Esempio n. 2
0
        public VisionComponent(IEntityLogger logger, IVisionProvider visionProvider, HumanoidNPCGameComponentContext internalContext, IWorldCoreGameComponentContext worldContext)
            : base(logger)
        {
            _internalContext = internalContext;
            _selfInstanceId  = internalContext.SelfInstanceId;
            _worldContext    = worldContext;
            _visionProvider  = visionProvider;

            _activePeriodicObjectContext = new ActivePeriodicObjectContext(worldContext.SyncContext);
            _activeObject = new AsyncActivePeriodicObject(_activePeriodicObjectContext);
            _activeObject.PeriodicMethod = CommandLoop;
        }