//----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- public TileDoor() { animationOpen = GameData.ANIM_TILE_DOOR_OPEN; animationClose = GameData.ANIM_TILE_DOOR_CLOSE; openCloseSound = GameData.SOUND_DUNGEON_DOOR; Graphics.SyncPlaybackWithRoomTicks = false; }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- public Reward() { this.id = ""; this.animation = null; this.message = ""; this.hasDuration = false; this.isCollectibleWithItems = false; this.onlyShowMessageInChest = false; this.soundBounce = null; }
private Entity transformedEntity; // The entity this entity has transformed into (bomb -> explosion) #endregion Fields #region Constructors //----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- public Entity() { entityIndex = -1; roomControl = null; isAlive = false; isInRoom = false; isInitialized = false; transformedEntity = null; soundBounce = null; position = Vector2F.Zero; zPosition = 0.0f; previousPosition = Vector2F.Zero; previousZPosition = 0.0f; physics = new PhysicsComponent(this); graphics = new GraphicsComponent(this); centerOffset = Point2I.Zero; actionAlignDistance = 5; }
public override void Clone(BaseTileData copy) { base.Clone(copy); if (copy is TileData) { TileData copyTileData = (TileData) copy; //size = copyTileData.size; spriteAsObject = new SpriteAnimation(copyTileData.spriteAsObject); breakAnimation = copyTileData.breakAnimation; breakSound = copyTileData.breakSound; events = new ObjectEventCollection(copyTileData.events); if (copyTileData.spriteList.Length > 0) { spriteList = new SpriteAnimation[copyTileData.spriteList.Length]; for (int i = 0; i < spriteList.Length; i++) { spriteList[i] = new SpriteAnimation(copyTileData.spriteList[i]); } } } }
// Movement states: // - moving // - stopped // - paused // - chasing // - shooting?? //----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- public BasicMonster() { color = MonsterColor.Red; MaxHealth = 1; ContactDamage = 1; scaleAnimationSpeed = false; playAnimationOnlyWhenMoving = true; isAnimationHorizontal = false; moveSpeed = 0.5f; changeDirectionsOnCollide = true; syncAnimationWithDirection = true; movesInAir = false; stopTime.Set(30, 60); moveTime.Set(30, 50); chargeType = ChargeType.None; chargeDuration = RangeI.Zero; shootType = ShootType.None; aimType = AimType.Forward; projectileType = null; shootSpeed = 2.0f; projectileShootOdds = 5; shootPauseDuration = 30; shootSound = null; }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Use Tile.CreateTile() instead of this constructor. protected Tile() { tileGridArea = Rectangle2I.Zero; isAlive = false; isInitialized = false; location = Point2I.Zero; layer = 0; offset = Point2I.Zero; size = Point2I.One; spriteAsObject = new SpriteAnimation(); isSolid = false; isMoving = false; pushDelay = 20; properties = new Properties(this); tileData = null; moveDirection = Point2I.Zero; dropList = null; hasMoved = false; path = null; pathTimer = 0; pathMoveIndex = 0; fallsInHoles = true; soundMove = GameData.SOUND_BLOCK_PUSH; conveyorVelocity = Vector2F.Zero; surfaceTile = null; collisionStyle = CollisionStyle.Rectangular; graphics = new TileGraphicsComponent(this); }