Esempio n. 1
0
        public AsteroidData(int entityId, int typeId, int speed) : base(entityId, typeId)
        {
            IDataTable <DRAsteroid> dtAsteroid = GameEntry.DataTable.GetDataTable <DRAsteroid>();
            DRAsteroid drAsteroid = dtAsteroid.GetDataRow(typeId);

            if (drAsteroid == null)
            {
                return;
            }

            Speed = speed;
        }
Esempio n. 2
0
        public AsteroidData(int entityId, int typeId)
            : base(entityId, typeId, CampType.Neutral)
        {
            IDataTable <DRAsteroid> dtAsteroid = GameEntry.DataTable.GetDataTable <DRAsteroid>();
            DRAsteroid drAsteroid = dtAsteroid.GetDataRow(TypeId);

            if (drAsteroid == null)
            {
                return;
            }

            HP             = m_MaxHP = drAsteroid.MaxHP;
            m_Attack       = drAsteroid.Attack;
            m_Speed        = drAsteroid.Speed;
            m_AngularSpeed = drAsteroid.AngularSpeed;
            m_DeadEffectId = drAsteroid.DeadEffectId;
            m_DeadSoundId  = drAsteroid.DeadSoundId;
        }