Exemplo n.º 1
0
 public NPCRendererFactory(IEndlessGameProvider endlessGameProvider,
                           ICharacterRendererProvider characterRendererProvider,
                           IENFFileProvider enfFileProvider,
                           INPCSpriteSheet npcSpriteSheet,
                           IRenderOffsetCalculator renderOffsetCalculator)
 {
     _endlessGameProvider       = endlessGameProvider;
     _characterRendererProvider = characterRendererProvider;
     _enfFileProvider           = enfFileProvider;
     _npcSpriteSheet            = npcSpriteSheet;
     _renderOffsetCalculator    = renderOffsetCalculator;
 }
Exemplo n.º 2
0
        public NPCRenderer(IEndlessGameProvider endlessGameProvider,
                           ICharacterRendererProvider characterRendererProvider,
                           IENFFileProvider enfFileProvider,
                           INPCSpriteSheet npcSpriteSheet,
                           IRenderOffsetCalculator renderOffsetCalculator,
                           INPC initialNPC)
            : base((Game)endlessGameProvider.Game)
        {
            NPC = initialNPC;

            _characterRendererProvider = characterRendererProvider;
            _enfFileProvider           = enfFileProvider;
            _npcSpriteSheet            = npcSpriteSheet;
            _renderOffsetCalculator    = renderOffsetCalculator;

            _baseTextureFrameRectangle = GetStandingFrameRectangle();
            _readonlyTopPixel          = GetTopPixel();

            _hasStandingAnimation  = GetHasStandingAnimation();
            _lastStandingAnimation = DateTime.Now;
            _fadeAwayAlpha         = 255;
        }