public Bullet(Vector2 position, Vector2 direction, int size, int touchDamage, int livePoints, TimeSpan liveTime, WorldItemType bulletType) { this.position = position; this.direction = direction; this.size = size; this.touchDamage = touchDamage; this.livePoints = livePoints; this.liveTime = liveTime; this.type = bulletType; this.hitbox = new Rectangle((int)position.X, (int)position.Y, size, size); switch(bulletType) { case WorldItemType.EnemyBullet: this.type = bulletType; this.color = GameColors.BEnemy; break; case WorldItemType.PlayerBullet: this.type = bulletType; this.color = GameColors.BPlayer; break; default: this.type = WorldItemType.Enemy; this.color = Color.Black; this.livePoints = -1; break; } }
public MonsterSpawner(int x, int y, int touchDamage, int livePoints, TimeSpan timeBetweenSpawns, Field parrent) { this.position = new Vector2(x * Data.BlockSize, y * Data.BlockSize); this.hitbox = new Rectangle(x * Data.BlockSize, y * Data.BlockSize, Data.BlockSize, Data.BlockSize); this.color = GameColors.EBasic; this.touchDamage = touchDamage; this.livePoints = livePoints; this.liveTime = timeBetweenSpawns; this.parrent = parrent; this.type = WorldItemType.Spawner; this.touchedThisFrame = new List<IWorldItem>(); this.lastSpawn = DateTime.Now; }
public CollisionData(IWorldItem item, WorldItemType itemType) { Item = item; ItemType = itemType; }
public void SetWorldItemType(WorldItemType value) { _worldItemType = value; }