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); }
public AGSCheckBox(string id, Resolver resolver) : base(id, resolver) { _uIEvents = AddComponent<IUIEvents>(); _skinComponent = AddComponent<ISkinComponent>(); _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>(); _textComponent = AddComponent<ITextComponent>(); _checkboxComponent = AddComponent<ICheckboxComponent>(); beforeInitComponents(resolver); InitComponents(); afterInitComponents(resolver); }
public AGSButton(string id, Resolver resolver) : base(id, resolver) { _uIEvents = AddComponent <IUIEvents>(); _skinComponent = AddComponent <ISkinComponent>(); _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>(); _textComponent = AddComponent <ITextComponent>(); _buttonComponent = AddComponent <IButtonComponent>(); _modelMatrixComponent = AddComponent <IModelMatrixComponent>(); beforeInitComponents(resolver); InitComponents(); afterInitComponents(resolver); }
public override void Init(IEntity entity) { base.Init(entity); _drawableInfo = entity.GetComponent <IDrawableInfo>(); _obj = entity.GetComponent <IAnimationContainer>(); _scale = entity.GetComponent <IScaleComponent>(); _pixelPerfect = entity.GetComponent <IPixelPerfectComponent>(); }
public override void Init(IEntity entity) { base.Init(entity); _drawableInfo = entity.GetComponent<IDrawableInfo>(); _obj = entity.GetComponent<IAnimationContainer>(); _scale = entity.GetComponent<IScaleComponent>(); _pixelPerfect = entity.GetComponent<IPixelPerfectComponent>(); }
public override void Init(IEntity entity) { base.Init(entity); IAnimationContainer animation = entity.GetComponent <IAnimationContainer>(); TypedParameter animationParam = new TypedParameter(typeof(IAnimationContainer), animation); _pixelPerfect = _resolver.Resolve <IPixelPerfectCollidable>(animationParam); }
public ICharacter GetCharacter(string id, IOutfit outfit, IAnimationContainer container) { TypedParameter outfitParam = new TypedParameter (typeof(IOutfit), outfit); TypedParameter idParam = new TypedParameter (typeof(string), id); TypedParameter animationParam = new TypedParameter (typeof(IAnimationContainer), container); ICharacter character = _resolver.Resolve<ICharacter>(outfitParam, idParam, animationParam); return character; }
public ICharacter GetCharacter(string id, IOutfit outfit, IAnimationContainer container) { TypedParameter outfitParam = new TypedParameter(typeof(IOutfit), outfit); TypedParameter idParam = new TypedParameter(typeof(string), id); TypedParameter animationParam = new TypedParameter(typeof(IAnimationContainer), container); ICharacter character = _resolver.Resolve <ICharacter>(outfitParam, idParam, animationParam); return(character); }
public override void Init(IEntity entity) { base.Init(entity); _events = entity.GetComponent <IUIEvents>(); _animation = entity.GetComponent <IAnimationContainer>(); _events.MouseEnter.Subscribe(onMouseEnter); _events.MouseLeave.Subscribe(onMouseLeave); _events.MouseUp.Subscribe(onMouseUp); }
public override void Init(IEntity entity) { base.Init(entity); _events = entity.GetComponent<IUIEvents>(); _animation = entity.GetComponent<IAnimationContainer>(); _events.MouseEnter.Subscribe(onMouseEnter); _events.MouseLeave.Subscribe(onMouseLeave); _events.MouseUp.Subscribe(onMouseUp); }
private async Task <AnimationCompletedEventArgs> animateWithTimeout(IAnimationContainer container, Task <AnimationCompletedEventArgs> task) { Task <AnimationCompletedEventArgs> timeoutTask = Task.Run(async() => { await Task.Delay(10000); return((AnimationCompletedEventArgs)null); }); Task <AnimationCompletedEventArgs> result = await Task.WhenAny(task, timeoutTask); Assert.AreEqual(task, result, "Animation timeout for " + container.GetType().Name); return(result.Result); }
public override void Init(IEntity entity) { base.Init(entity); _entity = entity; _animation = entity.GetComponent <IAnimationContainer>(); _tree = entity.GetComponent <IInObjectTree>(); _scale = entity.GetComponent <IScaleComponent>(); _translate = entity.GetComponent <ITranslateComponent>(); _rotate = entity.GetComponent <IRotateComponent>(); _image = entity.GetComponent <IImageComponent>(); _room = entity.GetComponent <IHasRoom>(); _drawable = entity.GetComponent <IDrawableInfo>(); }
public Animator(IAnimationContainer container) : this() { this.container = container; }
public AGSPixelPerfectCollidable(IAnimationContainer animation) { _animation = animation; _animation.OnAnimationStarted.Subscribe((sender, args) => PixelPerfect(_pixelPerfect)); }
public override void Init(IEntity entity) { base.Init(entity); _obj = entity.GetComponent <IAnimationContainer>(); _transform = entity.GetComponent <ITranslateComponent>(); }
public override void Init(IEntity entity) { base.Init(entity); _animation = entity.GetComponent<IAnimationContainer>(); }
public override void Init(IEntity entity) { base.Init(entity); _obj = entity.GetComponent<IAnimationContainer>(); _transform = entity.GetComponent<ITranslateComponent>(); }
public override void Init(IEntity entity) { base.Init(entity); _animationContainer = entity.GetComponent <IAnimationContainer>(); _scale = entity.GetComponent <IScaleComponent>(); }
private async Task<AnimationCompletedEventArgs> animateWithTimeout(IAnimationContainer container, Task<AnimationCompletedEventArgs> task) { Task<AnimationCompletedEventArgs> timeoutTask = Task.Run(async () => { await Task.Delay(10000); return (AnimationCompletedEventArgs)null; }); Task<AnimationCompletedEventArgs> result = await Task.WhenAny(task, timeoutTask); Assert.AreEqual(task, result, "Animation timeout for " + container.GetType().Name); return result.Result; }