public override void Dispose() { if (!base.IsDisposed) { Console.WriteLine("Disposing Game Over Boss Screen"); this.m_lastBoss = null; this.m_dialoguePlate.Dispose(); this.m_dialoguePlate = null; this.m_continueText.Dispose(); this.m_continueText = null; this.m_playerGhost.Dispose(); this.m_playerGhost = null; this.m_spotlight.Dispose(); this.m_spotlight = null; this.m_bossFallSound.Dispose(); this.m_bossFallSound = null; this.m_bossKneesSound.Dispose(); this.m_bossKneesSound = null; this.m_playerFrame.Dispose(); this.m_playerFrame = null; this.m_king.Dispose(); this.m_king = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { m_blacksmith.Dispose(); m_blacksmith = null; m_blacksmithIcon.Dispose(); m_blacksmithIcon = null; m_blacksmithNewIcon.Dispose(); m_blacksmithNewIcon = null; m_blacksmithBoard.Dispose(); m_blacksmithBoard = null; m_enchantress.Dispose(); m_enchantress = null; m_enchantressIcon.Dispose(); m_enchantressIcon = null; m_enchantressNewIcon.Dispose(); m_enchantressNewIcon = null; m_tent.Dispose(); m_tent = null; m_architect.Dispose(); m_architect = null; m_architectIcon.Dispose(); m_architectIcon = null; m_screw.Dispose(); m_screw = null; if (m_blacksmithAnvilSound != null) { m_blacksmithAnvilSound.Dispose(); } m_blacksmithAnvilSound = null; m_tree1 = null; m_tree2 = null; m_tree3 = null; m_fern1 = null; m_fern2 = null; m_fern3 = null; foreach (var current in m_rainFG) { current.Dispose(); } m_rainFG.Clear(); m_rainFG = null; m_mountain1 = null; m_mountain2 = null; m_tollCollector.Dispose(); m_tollCollector = null; m_tollCollectorIcon.Dispose(); m_tollCollectorIcon = null; m_blacksmithBlock = null; m_enchantressBlock = null; m_architectBlock = null; if (m_rainSFX != null) { m_rainSFX.Dispose(); } m_rainSFX = null; base.Dispose(); } }
public EnemyObj_BallAndChain(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyFlailKnight_Character", target, physicsManager, levelToAttachTo, difficulty) { this.m_ballAndChain = new ProjectileObj("EnemyFlailKnightBall_Sprite"); this.m_ballAndChain.IsWeighted = false; this.m_ballAndChain.CollidesWithTerrain = false; this.m_ballAndChain.IgnoreBoundsCheck = true; this.m_ballAndChain.OutlineWidth = 2; this.m_ballAndChain2 = (this.m_ballAndChain.Clone() as ProjectileObj); this.m_chain = new SpriteObj("EnemyFlailKnightLink_Sprite"); this.m_chainLinksList = new List<Vector2>(); this.m_chainLinks2List = new List<Vector2>(); for (int i = 0; i < this.m_numChainLinks; i++) { this.m_chainLinksList.Add(default(Vector2)); } for (int j = 0; j < this.m_numChainLinks / 2; j++) { this.m_chainLinks2List.Add(default(Vector2)); } this.Type = 1; this.TintablePart = this._objectList[3]; this.m_walkSound = new FrameSoundObj(this, this.m_target, 1, new string[] { "KnightWalk1", "KnightWalk2" }); this.m_walkSound2 = new FrameSoundObj(this, this.m_target, 6, new string[] { "KnightWalk1", "KnightWalk2" }); }
public override void PassInData(List <object> objList) { m_lastBoss = (objList[0] as EnemyObj_LastBoss); m_bossKneesSound = new FrameSoundObj(m_lastBoss, 3, "FinalBoss_St2_Deathsceen_Knees"); m_bossFallSound = new FrameSoundObj(m_lastBoss, 13, "FinalBoss_St2_Deathsceen_Fall"); base.PassInData(objList); }
public EnemyObj_BallAndChain(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyFlailKnight_Character", target, physicsManager, levelToAttachTo, difficulty) { BallAndChain = new ProjectileObj("EnemyFlailKnightBall_Sprite"); BallAndChain.IsWeighted = false; BallAndChain.CollidesWithTerrain = false; BallAndChain.IgnoreBoundsCheck = true; BallAndChain.OutlineWidth = 2; BallAndChain2 = (BallAndChain.Clone() as ProjectileObj); m_chain = new SpriteObj("EnemyFlailKnightLink_Sprite"); m_chainLinksList = new List <Vector2>(); m_chainLinks2List = new List <Vector2>(); for (var i = 0; i < m_numChainLinks; i++) { m_chainLinksList.Add(default(Vector2)); } for (var j = 0; j < m_numChainLinks / 2; j++) { m_chainLinks2List.Add(default(Vector2)); } Type = 1; TintablePart = _objectList[3]; m_walkSound = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2"); m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2"); }
public override void Dispose() { if (!IsDisposed) { Console.WriteLine("Disposing Game Over Boss Screen"); m_lastBoss = null; m_dialoguePlate.Dispose(); m_dialoguePlate = null; m_continueText.Dispose(); m_continueText = null; m_playerGhost.Dispose(); m_playerGhost = null; m_spotlight.Dispose(); m_spotlight = null; m_bossFallSound.Dispose(); m_bossFallSound = null; m_bossKneesSound.Dispose(); m_bossKneesSound = null; m_playerFrame.Dispose(); m_playerFrame = null; m_king.Dispose(); m_king = null; base.Dispose(); } }
public EnemyObj_Mimic(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyMimicIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { Type = 33; OutlineWidth = 0; m_closeSound = new FrameSoundObj(this, m_target, 1, "Chest_Snap"); }
public EnemyObj_SwordKnight(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemySwordKnightIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { Type = 16; m_walkSound = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2"); m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2"); }
public EnemyObj_Wolf(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyWargIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { Type = 19; m_startDelayCounter = m_startDelay; m_runFrameSound = new FrameSoundObj(this, 1, "Wolf_Move01", "Wolf_Move02", "Wolf_Move03"); }
public override void Dispose() { if (!IsDisposed) { m_closeSound.Dispose(); m_closeSound = null; base.Dispose(); } }
public EnemyObj_Knight(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemySpearKnightIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { TintablePart = _objectList[1]; Type = 12; m_walkSound = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2"); m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2"); }
public override void Dispose() { if (!base.IsDisposed) { this.m_closeSound.Dispose(); this.m_closeSound = null; base.Dispose(); } }
public EnemyObj_Eyeball(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyEyeballIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { m_pupil = new SpriteObj("EnemyEyeballPupil_Sprite"); AddChild(m_pupil); m_squishSound = new FrameSoundObj(this, m_target, 2, "Eyeball_Prefire"); Type = 6; DisableCollisionBoxRotations = false; }
public EnemyObj_Mimic(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyMimicIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { this.Type = 33; base.OutlineWidth = 0; this.m_closeSound = new FrameSoundObj(this, this.m_target, 1, new string[] { "Chest_Snap" }); }
public override void Dispose() { if (!base.IsDisposed) { this.m_walkSound.Dispose(); this.m_walkSound = null; this.m_walkSound2.Dispose(); this.m_walkSound2 = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { m_walkSound.Dispose(); m_walkSound = null; m_walkSound2.Dispose(); m_walkSound2 = null; base.Dispose(); } }
public EnemyObj_Eyeball(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyEyeballIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { this.m_pupil = new SpriteObj("EnemyEyeballPupil_Sprite"); this.AddChild(this.m_pupil); this.m_squishSound = new FrameSoundObj(this, this.m_target, 2, new string[] { "Eyeball_Prefire" }); this.Type = 6; base.DisableCollisionBoxRotations = false; }
public override void Dispose() { if (!IsDisposed) { if (m_gallopSound != null) { m_gallopSound.Dispose(); } m_gallopSound = null; base.Dispose(); } }
public EnemyObj_Wolf(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyWargIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { this.Type = 19; this.m_startDelayCounter = this.m_startDelay; this.m_runFrameSound = new FrameSoundObj(this, 1, new string[] { "Wolf_Move01", "Wolf_Move02", "Wolf_Move03" }); }
public EnemyObj_ShieldKnight(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("EnemyShieldKnightIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { this.Type = 14; this.m_walkSound = new FrameSoundObj(this, this.m_target, 1, new string[] { "KnightWalk1", "KnightWalk2" }); this.m_walkSound2 = new FrameSoundObj(this, this.m_target, 6, new string[] { "KnightWalk1", "KnightWalk2" }); }
public override void Dispose() { if (!IsDisposed) { m_pupil.Dispose(); m_pupil = null; m_squishSound.Dispose(); m_squishSound = null; if (m_deathLoop != null && !m_deathLoop.IsDisposed) { m_deathLoop.Dispose(); } m_deathLoop = null; base.Dispose(); } }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character")); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f))); logicSet.AddAction(new DelayLogicAction(0.5f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character")); logicSet2.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet2.AddAction(new DelayLogicAction(0.5f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyHorseTurn_Character")); logicSet3.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f))); logicSet3.AddAction(new DelayLogicAction(0.25f)); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.None)); logicSet3.AddAction(new RunFunctionLogicAction(this, "ResetTurn")); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyHorseTurn_Character")); logicSet4.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet4.AddAction(new DelayLogicAction(0.25f)); logicSet4.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.FlipHorizontally)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ResetTurn")); var logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character")); logicSet5.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f))); ThrowStandingProjectiles(logicSet5, true); var logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character")); logicSet6.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); ThrowStandingProjectiles(logicSet6, true); m_generalBasicLB.AddLogicSet(logicSet, logicSet2); m_turnLB.AddLogicSet(logicSet4, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_turnLB); m_gallopSound = new FrameSoundObj(this, m_target, 2, "Enemy_Horse_Gallop_01", "Enemy_Horse_Gallop_02", "Enemy_Horse_Gallop_03"); base.InitializeLogic(); }
public override void Dispose() { if (!IsDisposed) { m_chain.Dispose(); m_chain = null; BallAndChain.Dispose(); BallAndChain = null; BallAndChain2.Dispose(); BallAndChain2 = null; m_chainLinksList.Clear(); m_chainLinksList = null; m_chainLinks2List.Clear(); m_chainLinks2List = null; m_walkSound.Dispose(); m_walkSound = null; m_walkSound2.Dispose(); m_walkSound2 = null; base.Dispose(); } }
public override void Dispose() { if (!IsDisposed) { Console.WriteLine("Disposing Game Over Screen"); m_player = null; m_dialoguePlate.Dispose(); m_dialoguePlate = null; m_continueText.Dispose(); m_continueText = null; m_playerGhost.Dispose(); m_playerGhost = null; m_spotlight.Dispose(); m_spotlight = null; m_playerFallSound.Dispose(); m_playerFallSound = null; m_playerSwordFallSound.Dispose(); m_playerSwordFallSound = null; m_playerSwordSpinSound.Dispose(); m_playerSwordSpinSound = null; m_objKilledPlayer = null; if (m_enemyList != null) { m_enemyList.Clear(); } m_enemyList = null; if (m_enemyStoredPositions != null) { m_enemyStoredPositions.Clear(); } m_enemyStoredPositions = null; m_playerFrame.Dispose(); m_playerFrame = null; base.Dispose(); } }
public override void PassInData(List <object> objList) { if (objList != null) { m_player = (objList[0] as PlayerObj); if (m_playerFallSound == null) { m_playerFallSound = new FrameSoundObj(m_player, 14, "Player_Death_BodyFall"); m_playerSwordSpinSound = new FrameSoundObj(m_player, 2, "Player_Death_SwordTwirl"); m_playerSwordFallSound = new FrameSoundObj(m_player, 9, "Player_Death_SwordLand"); } m_enemyList = (objList[1] as List <EnemyObj>); m_coinsCollected = (int)objList[2]; m_bagsCollected = (int)objList[3]; m_diamondsCollected = (int)objList[4]; if (objList[5] != null) { m_objKilledPlayer = (objList[5] as GameObj); } SetObjectKilledPlayerText(); m_enemyStoredPositions.Clear(); base.PassInData(objList); } }
public override void Dispose() { if (!base.IsDisposed) { Console.WriteLine("Disposing Game Over Screen"); this.m_player = null; this.m_dialoguePlate.Dispose(); this.m_dialoguePlate = null; this.m_continueText.Dispose(); this.m_continueText = null; this.m_playerGhost.Dispose(); this.m_playerGhost = null; this.m_spotlight.Dispose(); this.m_spotlight = null; this.m_playerFallSound.Dispose(); this.m_playerFallSound = null; this.m_playerSwordFallSound.Dispose(); this.m_playerSwordFallSound = null; this.m_playerSwordSpinSound.Dispose(); this.m_playerSwordSpinSound = null; this.m_objKilledPlayer = null; if (this.m_enemyList != null) { this.m_enemyList.Clear(); } this.m_enemyList = null; if (this.m_enemyStoredPositions != null) { this.m_enemyStoredPositions.Clear(); } this.m_enemyStoredPositions = null; this.m_playerFrame.Dispose(); this.m_playerFrame = null; base.Dispose(); } }
public override void PassInData(List<object> objList) { if (objList != null) { this.m_player = (objList[0] as PlayerObj); if (this.m_playerFallSound == null) { this.m_playerFallSound = new FrameSoundObj(this.m_player, 14, new string[] { "Player_Death_BodyFall" }); this.m_playerSwordSpinSound = new FrameSoundObj(this.m_player, 2, new string[] { "Player_Death_SwordTwirl" }); this.m_playerSwordFallSound = new FrameSoundObj(this.m_player, 9, new string[] { "Player_Death_SwordLand" }); } this.m_enemyList = (objList[1] as List<EnemyObj>); this.m_coinsCollected = (int)objList[2]; this.m_bagsCollected = (int)objList[3]; this.m_diamondsCollected = (int)objList[4]; if (objList[5] != null) { this.m_objKilledPlayer = (objList[5] as GameObj); } this.SetObjectKilledPlayerText(); this.m_enemyStoredPositions.Clear(); base.PassInData(objList); } }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyHorseTurn_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f), -1f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.None), Types.Sequence.Serial); logicSet3.AddAction(new RunFunctionLogicAction(this, "ResetTurn", new object[0]), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyHorseTurn_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.FlipHorizontally), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "ResetTurn", new object[0]), Types.Sequence.Serial); LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f), -1f), Types.Sequence.Serial); this.ThrowStandingProjectiles(logicSet5, true); LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyHorseRun_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); this.ThrowStandingProjectiles(logicSet6, true); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2 }); this.m_turnLB.AddLogicSet(new LogicSet[] { logicSet4, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_turnLB); this.m_gallopSound = new FrameSoundObj(this, this.m_target, 2, new string[] { "Enemy_Horse_Gallop_01", "Enemy_Horse_Gallop_02", "Enemy_Horse_Gallop_03" }); base.InitializeLogic(); }
public override void Dispose() { if (!base.IsDisposed) { if (this.m_gallopSound != null) { this.m_gallopSound.Dispose(); } this.m_gallopSound = null; base.Dispose(); } }
public PlayerObj(string spriteName, PlayerIndex playerIndex, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, Game game) : base(spriteName, physicsManager, levelToAttachTo) { this.m_game = game; this.m_playerLegs = (base.GetChildAt(2) as SpriteObj); this.m_playerHead = (base.GetChildAt(12) as SpriteObj); this.m_playerIndex = playerIndex; this.m_currentLogicSet = new LogicSet(null); base.State = 0; base.CollisionTypeTag = 2; this.m_debugInputMap = new InputMap(PlayerIndex.Two, false); this.InitializeInputMap(); this.m_walkDownSound = new FrameSoundObj(this.m_playerLegs, 4, new string[] { "Player_WalkDown01", "Player_WalkDown02" }); this.m_walkUpSound = new FrameSoundObj(this.m_playerLegs, 1, new string[] { "Player_WalkUp01", "Player_WalkUp02" }); this.m_walkUpSoundHigh = new FrameSoundObj(this.m_playerLegs, 1, new string[] { "Player_WalkUp01_High", "Player_WalkUp02_High" }); this.m_walkDownSoundHigh = new FrameSoundObj(this.m_playerLegs, 4, new string[] { "Player_WalkDown01_High", "Player_WalkDown02_High" }); this.m_walkUpSoundLow = new FrameSoundObj(this.m_playerLegs, 1, new string[] { "Player_WalkUp01_Low", "Player_WalkUp02_Low" }); this.m_walkDownSoundLow = new FrameSoundObj(this.m_playerLegs, 4, new string[] { "Player_WalkDown01_Low", "Player_WalkDown02_Low" }); this.m_externalLS = new LogicSet(null); this.m_flightDurationText = new TextObj(Game.JunicodeFont); this.m_flightDurationText.FontSize = 12f; this.m_flightDurationText.Align = Types.TextAlign.Centre; this.m_flightDurationText.DropShadow = new Vector2(2f, 2f); base.OutlineWidth = 2; this.m_translocatorSprite = new ObjContainer("PlayerIdle_Character"); this.m_translocatorSprite.Visible = false; this.m_translocatorSprite.OutlineColour = Color.Blue; this.m_translocatorSprite.OutlineWidth = 2; this.m_swearBubble = new SpriteObj("SwearBubble1_Sprite"); this.m_swearBubble.Scale = new Vector2(2f, 2f); this.m_swearBubble.Flip = SpriteEffects.FlipHorizontally; this.m_swearBubble.Visible = false; this.m_axeProjData = new ProjectileData(this) { SpriteName = "SpellAxe_Sprite", SourceAnchor = new Vector2(20f, -20f), Target = null, Speed = new Vector2(this.AxeProjectileSpeed, this.AxeProjectileSpeed), IsWeighted = true, RotationSpeed = 10f, Damage = this.Damage, AngleOffset = 0f, Angle = new Vector2(-90f, -90f), CollidesWithTerrain = false, Scale = this.AxeSpellScale, IgnoreInvincibleCounter = true }; this.m_rapidDaggerProjData = new ProjectileData(this) { SpriteName = "SpellDagger_Sprite", SourceAnchor = Vector2.Zero, Speed = new Vector2(this.DaggerProjectileSpeed, this.DaggerProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = this.Damage, AngleOffset = 0f, CollidesWithTerrain = false, Scale = this.DaggerSpellScale, FollowArc = true, IgnoreInvincibleCounter = true }; }
public override void Dispose() { if (!base.IsDisposed) { if (this.m_currentLogicSet.IsActive) { this.m_currentLogicSet.Stop(); } this.m_currentLogicSet = null; this.m_standingAttack3LogicSet.Dispose(); this.m_standingAttack3LogicSet = null; this.m_airAttackLS.Dispose(); this.m_airAttackLS = null; this.m_debugInputMap.Dispose(); this.m_debugInputMap = null; this.m_playerHead = null; this.m_playerLegs = null; this.m_walkDownSound.Dispose(); this.m_walkDownSound = null; this.m_walkUpSound.Dispose(); this.m_walkUpSound = null; this.m_walkDownSoundLow.Dispose(); this.m_walkDownSoundLow = null; this.m_walkUpSoundLow.Dispose(); this.m_walkUpSoundLow = null; this.m_walkDownSoundHigh.Dispose(); this.m_walkDownSoundHigh = null; this.m_walkUpSoundHigh.Dispose(); this.m_walkUpSoundHigh = null; if (this.m_externalLS != null) { this.m_externalLS.Dispose(); } this.m_externalLS = null; this.m_lastTouchedTeleporter = null; this.m_flightDurationText.Dispose(); this.m_flightDurationText = null; this.m_game = null; this.m_translocatorSprite.Dispose(); this.m_translocatorSprite = null; this.m_swearBubble.Dispose(); this.m_swearBubble = null; this.m_flipTween = null; this.m_wizardSpellList.Clear(); this.m_wizardSpellList = null; this.m_closestGround = null; this.m_rapidDaggerProjData.Dispose(); this.m_axeProjData.Dispose(); base.Dispose(); } }
public override void PassInData(List<object> objList) { this.m_lastBoss = (objList[0] as EnemyObj_LastBoss); this.m_bossKneesSound = new FrameSoundObj(this.m_lastBoss, 3, new string[] { "FinalBoss_St2_Deathsceen_Knees" }); this.m_bossFallSound = new FrameSoundObj(this.m_lastBoss, 13, new string[] { "FinalBoss_St2_Deathsceen_Fall" }); base.PassInData(objList); }
public override void Dispose() { if (!base.IsDisposed) { this.m_pupil.Dispose(); this.m_pupil = null; this.m_squishSound.Dispose(); this.m_squishSound = null; if (this.m_deathLoop != null && !this.m_deathLoop.IsDisposed) { this.m_deathLoop.Dispose(); } this.m_deathLoop = null; base.Dispose(); } }
public override void Dispose() { if (!base.IsDisposed) { this.m_chain.Dispose(); this.m_chain = null; this.m_ballAndChain.Dispose(); this.m_ballAndChain = null; this.m_ballAndChain2.Dispose(); this.m_ballAndChain2 = null; this.m_chainLinksList.Clear(); this.m_chainLinksList = null; this.m_chainLinks2List.Clear(); this.m_chainLinks2List = null; this.m_walkSound.Dispose(); this.m_walkSound = null; this.m_walkSound2.Dispose(); this.m_walkSound2 = null; base.Dispose(); } }
public override void OnEnter() { if (Game.PlayerStats.SpecialItem == 9 && Game.PlayerStats.ChallengeEyeballBeaten) { Game.PlayerStats.SpecialItem = 0; } if (Game.PlayerStats.SpecialItem == 10 && Game.PlayerStats.ChallengeSkullBeaten) { Game.PlayerStats.SpecialItem = 0; } if (Game.PlayerStats.SpecialItem == 11 && Game.PlayerStats.ChallengeFireballBeaten) { Game.PlayerStats.SpecialItem = 0; } if (Game.PlayerStats.SpecialItem == 12 && Game.PlayerStats.ChallengeBlobBeaten) { Game.PlayerStats.SpecialItem = 0; } if (Game.PlayerStats.SpecialItem == 13 && Game.PlayerStats.ChallengeLastBossBeaten) { Game.PlayerStats.SpecialItem = 0; } Player.AttachedLevel.UpdatePlayerHUDSpecialItem(); m_isSnowing = (DateTime.Now.Month == 12 || DateTime.Now.Month == 1); if (m_isSnowing) { foreach (var current in m_rainFG) { current.ChangeToSnowflake(); } } if (!(Game.ScreenManager.Game as Game).SaveManager.FileExists(SaveType.Map) && Game.PlayerStats.HasArchitectFee) { Game.PlayerStats.HasArchitectFee = false; } Game.PlayerStats.TutorialComplete = true; Game.PlayerStats.IsDead = false; m_lightningTimer = 5f; Player.CurrentHealth = Player.MaxHealth; Player.CurrentMana = Player.MaxMana; Player.ForceInvincible = false; (Player.AttachedLevel.ScreenManager.Game as Game).SaveManager.SaveFiles(SaveType.PlayerData); if (TollCollectorAvailable && !Player.AttachedLevel.PhysicsManager.ObjectList.Contains(m_tollCollector)) { Player.AttachedLevel.PhysicsManager.AddObject(m_tollCollector); } if (m_blacksmithAnvilSound == null) { m_blacksmithAnvilSound = new FrameSoundObj(m_blacksmith.GetChildAt(5) as IAnimateableObj, Player, 7, "Anvil1", "Anvil2", "Anvil3"); } if (Game.PlayerStats.Traits.X == 35f || Game.PlayerStats.Traits.Y == 35f) { Game.ShadowEffect.Parameters["ShadowIntensity"].SetValue(0.7f); } else { Game.ShadowEffect.Parameters["ShadowIntensity"].SetValue(0); } m_playerWalkedOut = false; Player.UpdateCollisionBoxes(); Player.Position = new Vector2(0f, 660f - (Player.Bounds.Bottom - Player.Y)); Player.State = 1; Player.IsWeighted = false; Player.IsCollidable = false; var logicSet = new LogicSet(Player); logicSet.AddAction(new RunFunctionLogicAction(Player, "LockControls")); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character")); logicSet.AddAction(new PlayAnimationLogicAction()); logicSet.AddAction(new DelayLogicAction(0.5f)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 0)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "IsWeighted", true)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "IsCollidable", true)); Player.RunExternalLogicSet(logicSet); Tween.By(this, 1f, Linear.EaseNone); Tween.AddEndHandlerToLastTween(Player, "UnlockControls"); SoundManager.StopMusic(1f); m_isRaining = (CDGMath.RandomPlusMinus() > 0); m_isRaining = true; if (m_isRaining) { if (m_rainSFX != null) { m_rainSFX.Dispose(); } if (!m_isSnowing) { m_rainSFX = SoundManager.PlaySound("Rain1"); } else { m_rainSFX = SoundManager.PlaySound("snowloop_filtered"); } } m_tent.TextureColor = new Color(200, 200, 200); m_blacksmithBoard.TextureColor = new Color(200, 200, 200); m_screw.TextureColor = new Color(200, 200, 200); if (Game.PlayerStats.LockCastle) { m_screw.GoToFrame(m_screw.TotalFrames); m_architectBlock.Position = new Vector2(1492f, 579f); } else { m_screw.GoToFrame(1); m_architectBlock.Position = new Vector2(1492f, 439f); } Player.UpdateEquipmentColours(); base.OnEnter(); }
public EnemyObj_LastBoss(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty) : base("PlayerIdle_Character", target, physicsManager, levelToAttachTo, difficulty) { foreach (GameObj current in this._objectList) { current.TextureColor = new Color(100, 100, 100); } this.Type = 29; this.m_damageShieldProjectiles = new List<ProjectileObj>(); this._objectList[5].Visible = false; this._objectList[15].Visible = false; this._objectList[16].Visible = false; this._objectList[14].Visible = false; this._objectList[13].Visible = false; this._objectList[0].Visible = false; string text = (this._objectList[12] as IAnimateableObj).SpriteName; int startIndex = text.IndexOf("_") - 1; text = text.Remove(startIndex, 1); text = text.Replace("_", 7 + "_"); this._objectList[12].ChangeSprite(text); base.PlayAnimation(true); this.m_delayObj = new BlankObj(0, 0); this.m_walkDownSoundFinalBoss = new FrameSoundObj(this, 3, new string[] { "FinalBoss_St2_Foot_01", "FinalBoss_St2_Foot_02", "FinalBoss_St2_Foot_03" }); this.m_walkUpSoundFinalBoss = new FrameSoundObj(this, 6, new string[] { "FinalBoss_St2_Foot_04", "FinalBoss_St2_Foot_05" }); }