예제 #1
0
		public Helper(FightEngine engine, Character parent, HelperData data)
			: base(engine)
		{
			if (parent == null) throw new ArgumentNullException("parent");
			if (data == null) throw new ArgumentNullException("data");

			m_parent = parent;
			m_baseplayer = m_parent.BasePlayer;
			m_team = m_baseplayer.Team;
			m_offsetcharacter = (data.PositionType == PositionType.P2) ? parent.GetOpponent() : parent;
			m_remove = false;
			m_data = data;
			m_firsttick = true;
			m_statemanager = Parent.StateManager.Clone(this);
			m_spritemanager = Parent.SpriteManager.Clone();
			m_animationmanager = Parent.AnimationManager.Clone();
			m_commandmanager = Parent.CommandManager.Clone();
			m_soundmanager = Parent.SoundManager.Clone();
			m_dimensions = new CharacterDimensions(Data.GroundFront, Data.GroundBack, Data.AirFront, Data.AirBack, Data.Height);
			m_palfx = (Data.OwnPaletteFx == true) ? new PaletteFx() : Parent.PaletteFx;

			CurrentPalette = Parent.CurrentPalette;
			CurrentFacing = GetFacing(Data.PositionType, m_offsetcharacter.CurrentFacing, Data.FacingFlag < 0);
			CurrentLocation = GetStartLocation();
			CurrentScale = Data.Scale;

			SetLocalAnimation(0, 0);

			StateManager.ChangeState(Data.InitialStateNumber);
		}
예제 #2
0
        public Helper(FightEngine engine, Character parent, HelperData data)
            : base(engine)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            m_parent           = parent;
            m_baseplayer       = m_parent.BasePlayer;
            m_team             = m_baseplayer.Team;
            m_offsetcharacter  = data.PositionType == PositionType.P2 ? parent.GetOpponent() : parent;
            m_remove           = false;
            m_data             = data;
            m_firsttick        = true;
            m_statemanager     = Parent.StateManager.Clone(this);
            m_spritemanager    = Parent.SpriteManager.Clone();
            m_animationmanager = Parent.AnimationManager.Clone();
            m_commandmanager   = Parent.CommandManager.Clone();
            m_soundmanager     = Parent.SoundManager.Clone();
            m_dimensions       = new CharacterDimensions(Data.GroundFront, Data.GroundBack, Data.AirFront, Data.AirBack, Data.Height);
            m_palfx            = Data.OwnPaletteFx ? new PaletteFx() : Parent.PaletteFx;

            CurrentPalette  = Parent.CurrentPalette;
            CurrentFacing   = GetFacing(Data.PositionType, m_offsetcharacter.CurrentFacing, Data.FacingFlag < 0);
            CurrentLocation = GetStartLocation();
            CurrentScale    = Data.Scale;

            SetLocalAnimation(0, 0);

            StateManager.ChangeState(Data.InitialStateNumber);
        }