public AGSCharacter(string id, Resolver resolver, IOutfit outfit) : base(id, resolver)
 {
     _hasRoom               = AddComponent <IHasRoom>();
     _animationContainer    = AddComponent <IAnimationContainer>();
     _inObjectTree          = AddComponent <IInObjectTree>();
     _collider              = AddComponent <ICollider>();
     _visibleComponent      = AddComponent <IVisibleComponent>();
     _enabledComponent      = AddComponent <IEnabledComponent>();
     _customProperties      = AddComponent <ICustomPropertiesComponent>();
     _drawableInfo          = AddComponent <IDrawableInfo>();
     _hotspotComponent      = AddComponent <IHotspotComponent>();
     _shaderComponent       = AddComponent <IShaderComponent>();
     _translateComponent    = AddComponent <ITranslateComponent>();
     _imageComponent        = AddComponent <IImageComponent>();
     _scaleComponent        = AddComponent <IScaleComponent>();
     _rotateComponent       = AddComponent <IRotateComponent>();
     _pixelPerfectComponent = AddComponent <IPixelPerfectComponent>();
     _faceDirectionBehavior = AddComponent <IFaceDirectionBehavior>();
     _hasOutfit             = AddComponent <IHasOutfit>();
     _hasInventory          = AddComponent <IHasInventory>();
     _followBehavior        = AddComponent <IFollowBehavior>();
     _modelMatrixComponent  = AddComponent <IModelMatrixComponent>();
     beforeInitComponents(resolver, outfit);
     InitComponents();
     afterInitComponents(resolver, outfit);
 }
        public AGSCharacter(string id, Resolver resolver, IOutfit outfit) : base(id, resolver)
        {            
            _hasRoom = AddComponent<IHasRoom>();            
            _animationContainer = AddComponent<IAnimationContainer>();            
            _inObjectTree = AddComponent<IInObjectTree>();            
            _collider = AddComponent<ICollider>();            
            _visibleComponent = AddComponent<IVisibleComponent>();            
            _enabledComponent = AddComponent<IEnabledComponent>();            
            _customProperties = AddComponent<ICustomPropertiesComponent>();            
            _drawableInfo = AddComponent<IDrawableInfo>();            
            _hotspotComponent = AddComponent<IHotspotComponent>();            
            _shaderComponent = AddComponent<IShaderComponent>();            
            _transformComponent = AddComponent<ITranslateComponent>();            
            _imageComponent = AddComponent<IImageComponent>();            
            _scaleComponent = AddComponent<IScaleComponent>();            
            _rotateComponent = AddComponent<IRotateComponent>();            
            _pixelPerfectComponent = AddComponent<IPixelPerfectComponent>();            
            _faceDirectionBehavior = AddComponent<IFaceDirectionBehavior>();            
            _hasOutfit = AddComponent<IHasOutfit>();            
            _hasInventory = AddComponent<IHasInventory>();            
            _followBehavior = AddComponent<IFollowBehavior>();
			beforeInitComponents(resolver, outfit);            
			InitComponents();
            afterInitComponents(resolver, outfit);            
        }
Example #3
0
		public AGSSayBehavior(IGameState state, IGameFactory factory, IInput input, ISayLocationProvider location,
			                  FastFingerChecker fastFingerChecker, ISayConfig sayConfig, IHasOutfit outfit, 
                              IFaceDirectionBehavior faceDirection, IBlockingEvent<BeforeSayEventArgs> onBeforeSay, 
                              ISoundEmitter emitter, ISpeechCache speechCache)
		{
			_state = state;
			_factory = factory;
			_input = input;
			_location = location;
			_fastFingerChecker = fastFingerChecker;
			_outfit = outfit;
			_faceDirection = faceDirection;
            _emitter = emitter;
            _speechCache = speechCache;
			SpeechConfig = sayConfig;
			OnBeforeSay = onBeforeSay;
		}
Example #4
0
 public AGSSayBehavior(IGameState state, IGameFactory factory, IInput input, ISayLocationProvider location,
                       FastFingerChecker fastFingerChecker, ISayConfig sayConfig, IHasOutfit outfit,
                       IFaceDirectionBehavior faceDirection, IBlockingEvent <BeforeSayEventArgs> onBeforeSay,
                       ISoundEmitter emitter, ISpeechCache speechCache)
 {
     _state             = state;
     _factory           = factory;
     _input             = input;
     _location          = location;
     _fastFingerChecker = fastFingerChecker;
     _outfit            = outfit;
     _faceDirection     = faceDirection;
     _emitter           = emitter;
     _speechCache       = speechCache;
     SpeechConfig       = sayConfig;
     OnBeforeSay        = onBeforeSay;
 }
Example #5
0
        public AGSWalkBehavior(IObject obj, IPathFinder pathFinder, IFaceDirectionBehavior faceDirection,
                               IHasOutfit outfit, IObjectFactory objFactory, IGame game, IGLUtils glUtils)
        {
            _state         = game.State;
            _cutscene      = _state.Cutscene;
            _events        = game.Events;
            _obj           = obj;
            _pathFinder    = pathFinder;
            _faceDirection = faceDirection;
            _outfit        = outfit;
            _objFactory    = objFactory;
            _glUtils       = glUtils;

            _debugPath     = new List <IObject> ();
            _walkCompleted = new TaskCompletionSource <object> ();
            _walkCompleted.SetResult(null);
            AdjustWalkSpeedToScaleArea = true;
            MovementLinkedToAnimation  = true;
            WalkStep = new PointF(8f, 8f);

            _events.OnRepeatedlyExecute.Subscribe(onRepeatedlyExecute);
        }
Example #6
0
		public AGSWalkBehavior(IObject obj, IPathFinder pathFinder, IFaceDirectionBehavior faceDirection, 
                               IHasOutfit outfit, IObjectFactory objFactory, IGame game, IGLUtils glUtils)
		{
            _state = game.State;
            _cutscene = _state.Cutscene;
            _events = game.Events;
			_obj = obj;
			_pathFinder = pathFinder;
			_faceDirection = faceDirection;
			_outfit = outfit;
			_objFactory = objFactory;
            _glUtils = glUtils;

			_debugPath = new List<IObject> ();
			_walkCompleted = new TaskCompletionSource<object> ();
			_walkCompleted.SetResult(null);
            AdjustWalkSpeedToScaleArea = true;
            MovementLinkedToAnimation = true;
            WalkStep = new PointF(8f, 8f);

            _events.OnRepeatedlyExecute.Subscribe(onRepeatedlyExecute);
		}
 public override void Init(IEntity entity)
 {
     base.Init(entity);
     _faceDirection = entity.GetComponent<IFaceDirectionBehavior>();
     _walk = entity.GetComponent<IWalkBehavior>();
 }
Example #8
0
 public override void Init(IEntity entity)
 {
     base.Init(entity);
     _faceDirection = entity.GetComponent <IFaceDirectionBehavior>();
     _walk          = entity.GetComponent <IWalkBehavior>();
 }