private void ThrowThreeProjectiles(LogicSet ls) { var projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(30f, 0f), Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), Scale = ProjectileScale }; ls.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnight_Projectile")); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Angle = new Vector2(45f, 45f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Angle = new Vector2(-45f, -45f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new PlayAnimationLogicAction("Attack", "End")); projectileData.Dispose(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyMimicShake_Character", false, false)); logicSet.AddAction(new PlayAnimationLogicAction(false)); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyMimicIdle_Character", true, false)); logicSet.AddAction(new DelayLogicAction(3f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new GroundCheckLogicAction()); logicSet2.AddAction(new LockFaceDirectionLogicAction(false)); logicSet2.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet2.AddAction(new LockFaceDirectionLogicAction(true)); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyMimicAttack_Character")); logicSet2.AddAction(new MoveDirectionLogicAction()); logicSet2.AddAction(new Play3DSoundLogicAction(this, m_target, "Chest_Open_Large")); logicSet2.AddAction(new JumpLogicAction()); logicSet2.AddAction(new DelayLogicAction(0.3f)); logicSet2.AddAction(new GroundCheckLogicAction()); new LogicSet(this); m_generalBasicLB.AddLogicSet(logicSet, logicSet2); logicBlocksToDispose.Add(m_generalBasicLB); base.InitializeLogic(); }
private void ThrowThreeProjectiles(LogicSet ls) { var projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = m_target, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, CollidesWithTerrain = false, Scale = ProjectileScale, Angle = new Vector2(0f, 0f) }; for (var i = 0; i <= 3; i++) { projectileData.AngleOffset = 0f; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.AngleOffset = 45f; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.AngleOffset = -45f; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new DelayLogicAction(0.1f)); } projectileData.Dispose(); }
private void ThrowCardinalProjectiles(LogicSet ls) { var projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Scale = ProjectileScale, CollidesWithTerrain = false, Angle = new Vector2(0f, 0f) }; var num = CDGMath.RandomPlusMinus(); for (var i = 0; i <= 170; i += 10) { projectileData.AngleOffset = i * num; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.AngleOffset = 90 + i * num; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.AngleOffset = 180 + i * num; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.AngleOffset = 270 + i * num; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new DelayLogicAction(0.175f)); } projectileData.Dispose(); }
private void ThrowExpertProjectiles(LogicSet ls, bool useBossProjectile = false) { var projectileData = new ProjectileData(this) { SpriteName = "GhostProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), CollidesWithTerrain = false, Scale = ProjectileScale }; ls.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "FairyAttack1")); projectileData.Angle = new Vector2(0f, 0f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Angle = new Vector2(90f, 90f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Angle = new Vector2(-90f, -90f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Angle = new Vector2(180f, 180f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Dispose(); }
protected override void InitializeLogic() { m_extractLS = new LogicSet(this); m_extractLS.AddAction(new PlayAnimationLogicAction(1, 2)); m_extractLS.AddAction(new DelayLogicAction(ExtractDelay)); m_extractLS.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "TrapSpike_01", "TrapSpike_02", "TrapSpike_03")); m_extractLS.AddAction(new PlayAnimationLogicAction(2, 4)); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangePropertyLogicAction(this, "Shake", true)); logicSet.AddAction(new DelayLogicAction(1f)); logicSet.AddAction(new ChangePropertyLogicAction(this, "Shake", false)); logicSet.AddAction(new DelayLogicAction(1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChaseLogicAction(m_target, Vector2.Zero, Vector2.Zero, true, 1f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChaseLogicAction(m_target, Vector2.Zero, Vector2.Zero, true, 1.75f)); ThrowAdvancedProjectiles(logicSet3, true); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChaseLogicAction(m_target, Vector2.Zero, Vector2.Zero, true, 1.75f)); ThrowExpertProjectiles(logicSet4, true); var logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChaseLogicAction(m_target, Vector2.Zero, Vector2.Zero, true, 1.25f)); ThrowProjectiles(logicSet5, true); m_generalBasicLB.AddLogicSet(logicSet, logicSet2); m_generalAdvancedLB.AddLogicSet(logicSet, logicSet3); m_generalExpertLB.AddLogicSet(logicSet, logicSet4); m_generalMiniBossLB.AddLogicSet(logicSet, logicSet5); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); base.InitializeLogic(); CollisionBoxes.Clear(); CollisionBoxes.Add(new CollisionBox((int)(-18f * ScaleX), (int)(-24f * ScaleY), (int)(36f * ScaleX), (int)(48f * ScaleY), 2, this)); CollisionBoxes.Add(new CollisionBox((int)(-15f * ScaleX), (int)(-21f * ScaleY), (int)(31f * ScaleX), (int)(44f * ScaleY), 1, this)); if (Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { (GetChildAt(0) as SpriteObj).ChangeSprite("GiantPortrait_Sprite"); Scale = new Vector2(2f, 2f); AddChild(new SpriteObj("Portrait" + CDGMath.RandomInt(0, 7) + "_Sprite") { OverrideParentScale = true }); CollisionBoxes.Clear(); CollisionBoxes.Add(new CollisionBox(-124, -176, 250, 354, 2, this)); CollisionBoxes.Add(new CollisionBox(-124, -176, 250, 354, 1, this)); } }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new LockFaceDirectionLogicAction(true)); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightIdle_Character")); logicSet.AddAction(new MoveDirectionLogicAction(0f)); logicSet.AddAction(new DelayLogicAction(0.5f, 2f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new LockFaceDirectionLogicAction(true)); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightWalk_Character")); logicSet2.AddAction(new MoveDirectionLogicAction()); logicSet2.AddAction(new DelayLogicAction(0.5f, 2f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new LockFaceDirectionLogicAction(true)); logicSet3.AddAction(new MoveDirectionLogicAction(0f)); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnIn_Character", false, false)); logicSet3.AddAction(new PlayAnimationLogicAction(1, 2)); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "ShieldKnight_Turn")); logicSet3.AddAction(new PlayAnimationLogicAction(3, TotalFrames)); logicSet3.AddAction(new LockFaceDirectionLogicAction(false)); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new LockFaceDirectionLogicAction(true)); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnOut_Character", true, false)); logicSet3.AddAction(new MoveDirectionLogicAction()); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new LockFaceDirectionLogicAction(true)); logicSet4.AddAction(new MoveDirectionLogicAction(0f)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnIn_Character", false, false)); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.05f)); logicSet4.AddAction(new PlayAnimationLogicAction(1, 2)); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "ShieldKnight_Turn")); logicSet4.AddAction(new PlayAnimationLogicAction(3, TotalFrames)); logicSet4.AddAction(new LockFaceDirectionLogicAction(false)); logicSet4.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(true)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnOut_Character", true, false)); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.09090909f)); logicSet4.AddAction(new MoveDirectionLogicAction()); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3); m_generalExpertLB.AddLogicSet(logicSet, logicSet2, logicSet4); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalExpertLB); SetCooldownLogicBlock(m_generalBasicLB, 100); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet.AddAction(new DelayLogicAction(1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f))); logicSet2.AddAction(new DelayLogicAction(1f)); m_basicAttackLB.AddLogicSet(logicSet2, logicSet); logicBlocksToDispose.Add(m_basicAttackLB); logicBlocksToDispose.Add(m_generalCooldownLB); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new LockFaceDirectionLogicAction(false)); logicSet.AddAction(new MoveLogicAction(m_target, true)); logicSet.AddAction(new LockFaceDirectionLogicAction(true)); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyWargRun_Character")); logicSet.AddAction(new ChangePropertyLogicAction(this, "Chasing", true)); logicSet.AddAction(new DelayLogicAction(1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new LockFaceDirectionLogicAction(false)); logicSet2.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyWargIdle_Character")); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Chasing", false)); logicSet2.AddAction(new DelayLogicAction(1f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new GroundCheckLogicAction()); logicSet3.AddAction(new LockFaceDirectionLogicAction(false)); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new LockFaceDirectionLogicAction(true)); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "Wolf_Attack")); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyWargPounce_Character")); logicSet3.AddAction(new DelayLogicAction(PounceDelay)); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyWargJump_Character", false, false)); logicSet3.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet3.AddAction(new MoveDirectionLogicAction()); logicSet3.AddAction(new JumpLogicAction()); logicSet3.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet3.AddAction(new GroundCheckLogicAction()); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyWargIdle_Character")); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(PounceLandDelay)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyWargHit_Character", false, false)); logicSet4.AddAction(new DelayLogicAction(0.2f)); logicSet4.AddAction(new GroundCheckLogicAction()); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3); m_wolfHitLB.AddLogicSet(logicSet4); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalCooldownLB); logicBlocksToDispose.Add(m_wolfHitLB); SetCooldownLogicBlock(m_generalCooldownLB, 40, 40, 20); base.InitializeLogic(); }
public void MovePlayerTo(GameObj target) { m_controlsLocked = true; if (Player.X != target.X - 150f) { if (Player.X > target.Position.X - 150f) { Player.Flip = SpriteEffects.FlipHorizontally; } var num = CDGMath.DistanceBetweenPts(Player.Position, new Vector2(target.X - 150f, target.Y)) / Player.Speed; Player.UpdateCollisionBoxes(); Player.State = 1; Player.IsWeighted = false; Player.AccelerationY = 0f; Player.AccelerationX = 0f; Player.IsCollidable = false; Player.CurrentSpeed = 0f; Player.LockControls(); Player.ChangeSprite("PlayerWalking_Character"); Player.PlayAnimation(); var logicSet = new LogicSet(Player); logicSet.AddAction(new DelayLogicAction(num)); Player.RunExternalLogicSet(logicSet); Tween.To(Player, num, Tween.EaseNone, "X", (target.Position.X - 150f).ToString()); Tween.AddEndHandlerToLastTween(this, "MovePlayerComplete", target); return; } MovePlayerComplete(target); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveDirectionLogicAction(new Vector2(-1f, 0f), -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); this.m_basicAttackLB.AddLogicSet(new LogicSet[] { logicSet2, logicSet }); this.logicBlocksToDispose.Add(this.m_basicAttackLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new LockFaceDirectionLogicAction(false)); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyZombieWalk_Character")); logicSet.AddAction(new MoveLogicAction(m_target, true)); logicSet.AddAction(new LockFaceDirectionLogicAction(true)); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "Zombie_Groan_01", "Zombie_Groan_02", "Zombie_Groan_03", "Blank", "Blank", "Blank", "Blank", "Blank")); logicSet.AddAction(new DelayLogicAction(0.5f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new LockFaceDirectionLogicAction(false)); logicSet2.AddAction(new MoveLogicAction(m_target, false, 0f)); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyZombieRise_Character", false, false)); logicSet2.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "Zombie_Rise")); logicSet2.AddAction(new PlayAnimationLogicAction(false)); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Risen", true)); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Lowered", false)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new LockFaceDirectionLogicAction(false)); logicSet3.AddAction(new MoveLogicAction(m_target, false, 0f)); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyZombieLower_Character", false, false)); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "Zombie_Lower")); logicSet3.AddAction(new PlayAnimationLogicAction(false)); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Risen", false)); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Lowered", true)); m_basicWalkLS.AddLogicSet(logicSet); m_basicRiseLowerLS.AddLogicSet(logicSet2, logicSet3); logicBlocksToDispose.Add(m_basicWalkLS); logicBlocksToDispose.Add(m_basicRiseLowerLS); base.InitializeLogic(); }
public void CloseGate(bool animate) { if (animate) { Player.Y = 381f; Player.X += 10f; Player.State = 1; 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 ChangePropertyLogicAction(Player, "CurrentSpeed", 200)); logicSet.AddAction(new DelayLogicAction(0.2f)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 0)); Player.RunExternalLogicSet(logicSet); Tween.By(m_castleGate, 1.5f, Quad.EaseOut, "Y", m_castleGate.Height.ToString()); Tween.AddEndHandlerToLastTween(Player, "UnlockControls"); Player.AttachedLevel.RunCinematicBorders(1.5f); } else { m_castleGate.Y += m_castleGate.Height; } m_gateClosed = true; }
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 void CloseGate(bool animate) { if (animate) { this.Player.Y = 381f; this.Player.X += 10f; this.Player.State = 1; LogicSet logicSet = new LogicSet(this.Player); logicSet.AddAction(new RunFunctionLogicAction(this.Player, "LockControls", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "CurrentSpeed", 200), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "CurrentSpeed", 0), Types.Sequence.Serial); this.Player.RunExternalLogicSet(logicSet); Tween.By(this.m_castleGate, 1.5f, new Easing(Quad.EaseOut), new string[] { "Y", this.m_castleGate.Height.ToString() }); Tween.AddEndHandlerToLastTween(this.Player, "UnlockControls", new object[0]); this.Player.AttachedLevel.RunCinematicBorders(1.5f); } else { this.m_castleGate.Y += (float)this.m_castleGate.Height; } this.m_gateClosed = true; }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEnergonWalk_Character")); logicSet.AddAction(new MoveLogicAction(m_target, true)); logicSet.AddAction(new DelayLogicAction(0.2f, 0.75f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEnergonWalk_Character")); logicSet2.AddAction(new MoveLogicAction(m_target, false)); logicSet2.AddAction(new DelayLogicAction(0.2f, 0.75f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character")); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(0.2f, 0.75f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEnergonAttack_Character", false, false)); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeforeAttack")); logicSet4.AddAction(new RunFunctionLogicAction(this, "FireCurrentTypeProjectile")); logicSet4.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character")); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEnergonAttack_Character", false, false)); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeforeAttack")); logicSet5.AddAction(new RunFunctionLogicAction(this, "SwitchRandomType")); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character")); logicSet5.AddAction(new DelayLogicAction(2f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet5); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); SetCooldownLogicBlock(m_generalCooldownLB, 0, 0, 100); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyChickenRun_Character")); logicSet.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.FlipHorizontally)); logicSet.AddAction(new MoveDirectionLogicAction()); logicSet.AddAction(new DelayLogicAction(0.5f, 1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyChickenRun_Character")); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Flip", SpriteEffects.None)); logicSet2.AddAction(new MoveDirectionLogicAction()); logicSet2.AddAction(new DelayLogicAction(0.5f, 1f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet2); logicBlocksToDispose.Add(m_generalBasicLB); base.InitializeLogic(); }
protected override void InitializeLogic() { var rotation = Rotation; var num = ParseTagToFloat("delay"); var num2 = ParseTagToFloat("speed"); if (num == 0f) { Console.WriteLine("ERROR: Turret set with delay of 0. Shoots too fast."); num = 10000f; } var projectileData = new ProjectileData(this) { SpriteName = "TurretProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(num2, num2), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(rotation, rotation), CollidesWithTerrain = true, Scale = ProjectileScale }; var logicSet = new LogicSet(this); logicSet.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Parallel); logicSet.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet.AddAction(new Play3DSoundLogicAction(this, m_target, "Turret_Attack01", "Turret_Attack02", "Turret_Attack03")); logicSet.AddAction(new DelayLogicAction(num)); m_generalBasicLB.AddLogicSet(logicSet); m_generalAdvancedLB.AddLogicSet(logicSet); m_generalExpertLB.AddLogicSet(logicSet); m_generalMiniBossLB.AddLogicSet(logicSet); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); projectileData.Dispose(); base.InitializeLogic(); }
private void ThrowStandingProjectiles(LogicSet ls, bool useBossProjectile = false) { var projectileData = new ProjectileData(this) { SpriteName = "SpellDamageShield_Sprite", SourceAnchor = new Vector2(0f, 60f), Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), CollidesWithTerrain = false, Scale = ProjectileScale, Lifespan = 0.75f }; ls.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "FairyAttack1")); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new DelayLogicAction(0.075f)); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new DelayLogicAction(0.075f)); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Dispose(); }
public override void OnEnter() { SoundManager.StopMusic(); Player.CurrentHealth = Player.MaxHealth; Player.CurrentMana = Player.MaxMana; Game.PlayerStats.HeadPiece = 7; Player.AttachedLevel.SetMapDisplayVisibility(false); Player.AttachedLevel.SetPlayerHUDVisibility(false); if (m_rainSFX != null) { m_rainSFX.Dispose(); } m_rainSFX = SoundManager.PlaySound("Rain1"); Player.UpdateCollisionBoxes(); Player.Position = new Vector2(10f, 660f - (Player.Bounds.Bottom - Player.Y)); Player.State = 1; 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(2.5f)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 0)); Player.RunExternalLogicSet(logicSet); Tween.RunFunction(2f, this, "Intro1"); base.OnEnter(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new MoveLogicAction(m_target, true)); logicSet.AddAction(new DelayLogicAction(1.25f, 2.75f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveLogicAction(m_target, false)); logicSet2.AddAction(new DelayLogicAction(1.25f, 2.75f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new StopAnimationLogicAction()); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(1f, 1.5f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalCooldownLB); SetCooldownLogicBlock(m_generalCooldownLB, 40, 40, 20); base.InitializeLogic(); }
private void ThrowRapidProjectiles(LogicSet ls) { var projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(130f, -28f), Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = Vector2.Zero }; ls.AddAction(new DelayLogicAction(0.2f, 0.35f)); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); ls.AddAction(new DelayLogicAction(0.2f, 0.35f)); projectileData.SourceAnchor = new Vector2(130f, 28f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Dispose(); }
private void ThrowThreeProjectiles(LogicSet ls) { var projectileData = new ProjectileData(this) { SpriteName = "BoneProjectile_Sprite", SourceAnchor = new Vector2(20f, -20f), Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = true, RotationSpeed = 10f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(-72f, -72f), CollidesWithTerrain = false, Scale = ProjectileScale }; ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Speed = new Vector2(ProjectileSpeed - 350f, ProjectileSpeed - 350f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Speed = new Vector2(ProjectileSpeed + 350f, ProjectileSpeed + 350f); ls.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); projectileData.Dispose(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new MoveLogicAction(m_target, true)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveLogicAction(m_target, false)); logicSet2.AddAction(new DelayLogicAction(0.5f, 1.25f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(0.5f, 1.25f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(m_target, true)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ResizeProjectile", true)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ResizeProjectile", false)); logicSet4.AddAction(new DelayLogicAction(3f)); var logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(m_target, true)); logicSet5.AddAction(new RunFunctionLogicAction(this, "FireRandomProjectile")); logicSet5.AddAction(new RunFunctionLogicAction(this, "FireRandomProjectile")); logicSet5.AddAction(new RunFunctionLogicAction(this, "FireRandomProjectile")); logicSet5.AddAction(new DelayLogicAction(1.3f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet5); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); SetCooldownLogicBlock(m_generalCooldownLB, 40, 40, 20); base.InitializeLogic(); }
public void StartCutscene() { m_cutsceneRunning = true; Player.LockControls(); Player.AccelerationY = 0f; Player.AttachedLevel.RunCinematicBorders(8f); Player.Flip = SpriteEffects.None; Player.State = 1; var logicSet = new LogicSet(Player); logicSet.AddAction(new ChangePropertyLogicAction(Player, "IsWeighted", false)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "IsCollidable", false)); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character")); logicSet.AddAction(new PlayAnimationLogicAction()); logicSet.AddAction(new DelayLogicAction(1.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.RunFunction(1.6f, this, "Cutscene2"); }
public void Intro2() { m_inSecondPart = true; Tween.RunFunction(3f, Player.AttachedLevel, "LightningEffectTwice"); var logicSet = new LogicSet(Player); logicSet.AddAction(new DelayLogicAction(5f)); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f))); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character")); logicSet.AddAction(new PlayAnimationLogicAction()); logicSet.AddAction(new DelayLogicAction(0.7f)); logicSet.AddAction(new ChangePropertyLogicAction(Player, "CurrentSpeed", 0)); Player.RunExternalLogicSet(logicSet); Tween.RunFunction(5.3f, this, "Intro3"); }
public void StartCutscene() { this.m_cutsceneRunning = true; this.Player.LockControls(); this.Player.AccelerationY = 0f; this.Player.AttachedLevel.RunCinematicBorders(8f); this.Player.Flip = SpriteEffects.None; this.Player.State = 1; LogicSet logicSet = new LogicSet(this.Player); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "IsWeighted", false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "IsCollidable", false), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1.5f, false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "CurrentSpeed", 0), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "IsWeighted", true), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "IsCollidable", true), Types.Sequence.Serial); this.Player.RunExternalLogicSet(logicSet); Tween.RunFunction(1.6f, this, "Cutscene2", new object[0]); }
public void TeleportPlayer(Vector2 position, TeleporterObj teleporter = null) { base.CurrentSpeed = 0f; this.Scale = this.m_internalScale; if (teleporter == null) { teleporter = this.m_lastTouchedTeleporter; } Console.WriteLine(string.Concat(new object[] { "Player pos: ", base.Position, " teleporter: ", teleporter.Position })); Tween.To(this, 0.4f, new Easing(Linear.EaseNone), new string[] { "X", teleporter.X.ToString() }); Tween.To(this, 0.05f, new Easing(Linear.EaseNone), new string[] { "delay", "1.5", "ScaleX", "0" }); Vector2 scale = this.Scale; this.ScaleX = 0f; Tween.To(this, 0.05f, new Easing(Linear.EaseNone), new string[] { "delay", "3.3", "ScaleX", scale.X.ToString() }); this.ScaleX = scale.X; Vector2 relativePos = new Vector2(position.X, position.Y - ((float)this.TerrainBounds.Bottom - base.Y)); LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new RunFunctionLogicAction(this, "LockControls", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerJumping_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new JumpLogicAction(500f), Types.Sequence.Serial); logicSet.AddAction(new PlaySoundLogicAction(new string[] { "Player_Jump_04" }), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(teleporter, "SetCollision", new object[] { true }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.4f, false), Types.Sequence.Serial); logicSet.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerLevelUp_Character", true, false), Types.Sequence.Parallel); logicSet.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this.AttachedLevel.ImpactEffectPool, "DisplayTeleportEffect", new object[] { new Vector2(teleporter.X, (float)teleporter.Bounds.Top) }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); logicSet.AddAction(new PlaySoundLogicAction(new string[] { "Teleport_Disappear" }), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this.AttachedLevel.ImpactEffectPool, "MegaTeleport", new object[] { new Vector2(teleporter.X, (float)teleporter.Bounds.Top), this.Scale }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.8f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ScreenManager, "StartWipeTransition", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(teleporter, "SetCollision", new object[] { false }), Types.Sequence.Serial); logicSet.AddAction(new TeleportLogicAction(null, relativePos), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ScreenManager, "EndWipeTransition", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this.AttachedLevel.ImpactEffectPool, "MegaTeleportReverse", new object[] { new Vector2(position.X - 5f, position.Y + 57f), scale }), Types.Sequence.Serial); logicSet.AddAction(new PlaySoundLogicAction(new string[] { "Teleport_Reappear" }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this, "LastBossDoorHack", new object[0]), Types.Sequence.Serial); this.RunExternalLogicSet(logicSet); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyZombieWalk_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Zombie_Groan_01", "Zombie_Groan_02", "Zombie_Groan_03", "Blank", "Blank", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, 0f), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyZombieRise_Character", false, false), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Zombie_Rise" }), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Risen", true), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(this, "Lowered", false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, false, 0f), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyZombieLower_Character", false, false), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Zombie_Lower" }), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Risen", false), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this, "Lowered", true), Types.Sequence.Serial); this.m_basicWalkLS.AddLogicSet(new LogicSet[] { logicSet }); this.m_basicRiseLowerLS.AddLogicSet(new LogicSet[] { logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_basicWalkLS); this.logicBlocksToDispose.Add(this.m_basicRiseLowerLS); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(0f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.5f, 2f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightWalk_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveDirectionLogicAction(-1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.5f, 2f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet3.AddAction(new MoveDirectionLogicAction(0f), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnIn_Character", false, false), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction(1, 2, false), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "ShieldKnight_Turn" }), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction(3, base.TotalFrames, false), Types.Sequence.Serial); logicSet3.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnOut_Character", true, false), Types.Sequence.Serial); logicSet3.AddAction(new MoveDirectionLogicAction(-1f), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new MoveDirectionLogicAction(0f), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnIn_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.05f), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(1, 2, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "ShieldKnight_Turn" }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(3, base.TotalFrames, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyShieldKnightTurnOut_Character", true, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.09090909f), Types.Sequence.Serial); logicSet4.AddAction(new MoveDirectionLogicAction(-1f), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet4 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); base.SetCooldownLogicBlock(this.m_generalBasicLB, new int[] { 100 }); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new StopAnimationLogicAction(), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); this.m_walkingLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); }
public override void OnEnter() { SoundManager.StopMusic(0f); this.Player.CurrentHealth = this.Player.MaxHealth; this.Player.CurrentMana = this.Player.MaxMana; Game.PlayerStats.HeadPiece = 7; this.Player.AttachedLevel.SetMapDisplayVisibility(false); this.Player.AttachedLevel.SetPlayerHUDVisibility(false); if (this.m_rainSFX != null) { this.m_rainSFX.Dispose(); } this.m_rainSFX = SoundManager.PlaySound("Rain1"); this.Player.UpdateCollisionBoxes(); this.Player.Position = new Vector2(10f, 660f - ((float)this.Player.Bounds.Bottom - this.Player.Y)); this.Player.State = 1; LogicSet logicSet = new LogicSet(this.Player); logicSet.AddAction(new RunFunctionLogicAction(this.Player, "LockControls", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(2.5f, false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "CurrentSpeed", 0), Types.Sequence.Serial); this.Player.RunExternalLogicSet(logicSet); Tween.RunFunction(2f, this, "Intro1", new object[0]); base.OnEnter(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightWalk_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, 1f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightWalk_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.2f, 1f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.2f, 1f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.AttackThrustDelay, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet4.AddAction(new MoveDirectionLogicAction(this.AttackThrustSpeed), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", new object[] { this, 20, 0.3f }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Parallel); logicSet4.AddAction(new DelayLogicAction(this.AttackThrustDuration, false), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.AttackThrustDelayExpert, false), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet5.AddAction(new MoveDirectionLogicAction(this.AttackThrustSpeedExpert), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", new object[] { this, 20, 0.3f }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Parallel); logicSet5.AddAction(new DelayLogicAction(this.AttackThrustDurationExpert, false), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.AttackThrustDelayMiniBoss, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet6.AddAction(new MoveDirectionLogicAction(this.AttackThrustSpeedMiniBoss), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", new object[] { this, 20, 0.3f }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(this.AttackThrustDurationMiniBoss, false), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet6.AddAction(new MoveDirectionLogicAction(this.AttackThrustSpeedMiniBoss), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", new object[] { this, 20, 0.3f }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(this.AttackThrustDurationMiniBoss, false), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet6.AddAction(new MoveDirectionLogicAction(this.AttackThrustSpeedMiniBoss), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this.m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", new object[] { this, 20, 0.3f }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(this.AttackThrustDurationMiniBoss, false), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.Tag = 2; ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(30f, 0f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), Scale = base.ProjectileScale }; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.AttackProjectileDelay, false), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnight_Projectile" }), Types.Sequence.Serial); logicSet7.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet7.Tag = 2; LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(this.AttackProjectileExpertDelay, false), Types.Sequence.Serial); this.ThrowThreeProjectiles(logicSet8); logicSet8.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet8.Tag = 2; LogicSet logicSet9 = new LogicSet(this); logicSet9.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(this.AttackProjectileMinibossDelay, false), Types.Sequence.Serial); logicSet9.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnight_Projectile" }), Types.Sequence.Serial); logicSet9.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f), Types.Sequence.Serial); this.ThrowTwoProjectiles(logicSet9); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); this.ThrowThreeProjectiles(logicSet9); logicSet9.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); this.ThrowTwoProjectiles(logicSet9); logicSet9.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet9.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet9.Tag = 2; LogicSet logicSet10 = new LogicSet(this); logicSet10.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(this.AttackProjectileMinibossDelay, false), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnight_Projectile" }), Types.Sequence.Serial); logicSet10.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f), Types.Sequence.Serial); this.ThrowThreeProjectiles(logicSet10); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); this.ThrowTwoProjectiles(logicSet10); logicSet10.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character", true, true), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.05f, false), Types.Sequence.Serial); this.ThrowThreeProjectiles(logicSet10); logicSet10.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet10.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet10.Tag = 2; LogicSet logicSet11 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet11.AddAction(new MoveLogicAction(this.m_target, false, 300f), Types.Sequence.Serial); logicSet11.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet11.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet11.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet11.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); this.ThrowRapidProjectiles(logicSet11); this.ThrowRapidProjectiles(logicSet11); this.ThrowRapidProjectiles(logicSet11); logicSet11.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet11.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet11.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet11.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); this.ThrowRapidProjectiles(logicSet11); this.ThrowRapidProjectiles(logicSet11); this.ThrowRapidProjectiles(logicSet11); logicSet11.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet11.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet11.Tag = 2; this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet5, logicSet8 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet6, logicSet9, logicSet10 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 55, 25, 20 }); projectileData.Dispose(); base.InitializeLogic(); }
private void ThrowRapidProjectiles(LogicSet ls) { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(130f, -28f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Angle = Vector2.Zero }; ls.AddAction(new DelayLogicAction(0.2f, 0.35f, false), Types.Sequence.Serial); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); ls.AddAction(new DelayLogicAction(0.2f, 0.35f, false), Types.Sequence.Serial); projectileData.SourceAnchor = new Vector2(130f, 28f); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Dispose(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherIdle_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, 0.75f, false), Types.Sequence.Serial); ProjectileData projectileData = new ProjectileData(this) { SpriteName = "ArrowProjectile_Sprite", SourceAnchor = new Vector2(10f, -20f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = true, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = true, Scale = base.ProjectileScale, FollowArc = true }; LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-20f, -20f); logicSet2.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet2.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet2.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-20f, -20f); logicSet3.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet3.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-20f, -20f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-50f, -50f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet3.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-35f, -35f); logicSet4.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-35f, -35f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-15f, -15f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-55f, -55f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-50f, -50f); logicSet5.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-50f, -50f); logicSet5.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-50f, -50f); logicSet6.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-50f, -50f); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet6.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-60f, -60f); logicSet7.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-60f, -60f); logicSet7.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet7.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-45f, -45f); logicSet7.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-70f, -70f); logicSet8.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet8.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-70f, -70f); logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet8.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet9 = new LogicSet(this); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-55f, -55f); logicSet9.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet9.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-55f, -55f); logicSet9.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-85f, -85f); logicSet9.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet9.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet9.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet9.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet10 = new LogicSet(this); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySkeletonArcherAttack_Character", false, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet10.AddAction(new RunFunctionLogicAction(this, "AngleArcher", new object[] { projectileData.Angle.X }), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Load" }), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "BeginAttack", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(this.m_fireDelay, false), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet10.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-85f, -85f); logicSet10.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-95f, -95f); logicSet10.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "SkeletonArcher_Attack_01", "SkeletonArcher_Attack_02", "SkeletonArcher_Attack_03" }), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Attack", "EndAttack", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet10.AddAction(new ChangePropertyLogicAction(base.GetChildAt(1), "Rotation", 0), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet8, logicSet5 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet3, logicSet9, logicSet6 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet4, logicSet10, logicSet7 }); projectileData.Dispose(); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this._objectList[1].TextureColor = this.TintablePart.TextureColor; base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyMimicShake_Character", false, false), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyMimicIdle_Character", true, false), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(3f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet2.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet2.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyMimicAttack_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveDirectionLogicAction(-1f), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Chest_Open_Large" }), Types.Sequence.Serial); logicSet2.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.3f, false), Types.Sequence.Serial); logicSet2.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); new LogicSet(this); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1.25f, 2.75f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1.25f, 2.75f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new StopAnimationLogicAction(), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(1f, 1.5f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 40, 40, 20 }); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightWalk_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightWalk_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.SlashDelay, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SlashTripleDelay, false), Types.Sequence.Serial); logicSet5.AddAction(new MoveDirectionLogicAction(this.TripleAttackSpeed), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0166666675f), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0833333358f), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.Tag = 2; ProjectileData data = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(60f, 0f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), CollidesWithTerrain = true, Scale = base.ProjectileScale }; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.SlashDelay, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.SlashTripleDelay, false), Types.Sequence.Serial); logicSet7.AddAction(new MoveDirectionLogicAction(this.TripleAttackSpeed), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.008333334f), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SwordKnight_Attack_v02" }), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new MoveLogicAction(null, true, 0f), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0833333358f), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet7.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet7.Tag = 2; LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightAttack_Character", false, false), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction("Start", "Windup", false), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(this.SlashDelay, false), Types.Sequence.Serial); logicSet8.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemySwordKnightIdle_Character", false, false), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet8.Tag = 2; this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet5 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); switch (base.Difficulty) { case GameTypes.EnemyDifficulty.BASIC: base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 14, 11, 75 }); break; case GameTypes.EnemyDifficulty.ADVANCED: case GameTypes.EnemyDifficulty.EXPERT: base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 40, 30, 30 }); break; case GameTypes.EnemyDifficulty.MINIBOSS: { LogicBlock arg_9C4_1 = this.m_generalCooldownLB; int[] array = new int[3]; array[0] = 100; base.SetCooldownLogicBlock(arg_9C4_1, array); break; } } base.InitializeLogic(); }
protected override void InitializeLogic() { this.InitializeProjectiles(); LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new ChaseLogicAction(this.m_target, new Vector2(-255f, -175f), new Vector2(255f, -75f), true, this.MoveDuration, -1f), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new ChaseLogicAction(this.m_target, false, 1f, -1f), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "CancelEarthSpell", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell", false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastEarthSpellIn", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastEarthSpellOut", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.SpellDelay, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("CastSpell", "End", false), Types.Sequence.Parallel); logicSet4.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastEarthSpell", new object[] { this.SpellDuration }), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "CancelEarthSpellIn", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell", false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "SummonFireball", null), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireDelay, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.SpellFireInterval, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "ResetFireball", null), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell", false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "SummonIceball", null), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.SpellDelay, false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "ShatterIceball", new object[] { this.SpellIceProjectileCount }), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("CastSpell", "End", false), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "ResetIceball", null), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyWizardTeleportOut_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "BeforeTeleport", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.TeleportDelay, false), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction("TeleportStart", "End", false), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", false), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.TeleportDuration, false), Types.Sequence.Serial); logicSet7.AddAction(new TeleportLogicAction(this.m_target, new Vector2(-400f, -400f), new Vector2(400f, 400f)), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", true), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyWizardTeleportIn_Character", true, false), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.5f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet7 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet5, logicSet6, logicSet7 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); LogicBlock arg_971_1 = this.m_generalCooldownLB; int[] array = new int[3]; array[0] = 100; base.SetCooldownLogicBlock(arg_971_1, array); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Move01", "Blob_Move02", "Blob_Move03", "Blank", "Blank", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1.1f, 1.9f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Move01", "Blob_Move02", "Blob_Move03", "Blank", "Blank", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1f, 1.5f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.5f, 0.9f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeforeJump", false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.JumpDelay, false), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, base.Speed * 6.75f), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Jump" }), Types.Sequence.Serial); logicSet4.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyBlobAir_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet4.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Land" }), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, base.Speed), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "Jump", false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyBlobIdle_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.Tag = 2; ProjectileData data = new ProjectileData(this) { SpriteName = "SpellDamageShield_Sprite", SourceAnchor = new Vector2(0f, 10f), Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, Angle = new Vector2(0f, 0f), AngleOffset = 0f, CollidesWithTerrain = false, Scale = base.ProjectileScale, Lifespan = this.ExpertBlobProjectileDuration, LockPosition = true }; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeforeJump", false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.JumpDelay, false), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, base.Speed * 6.75f), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Jump" }), Types.Sequence.Serial); logicSet5.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet5.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyBlobAir_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet5.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Land" }), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, base.Speed), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Jump", false), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyBlobIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "BeforeJump", false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.JumpDelay, false), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, base.Speed * 6.75f), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Jump" }), Types.Sequence.Serial); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet6.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyBlobAir_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, data), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet6.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Land" }), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, base.Speed), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyBlobJump_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Jump", false), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyBlobIdle_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Move01", "Blob_Move02", "Blob_Move03", "Blank", "Blank", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(1.1f, 1.9f, false), Types.Sequence.Serial); LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet8.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Move01", "Blob_Move02", "Blob_Move03", "Blank", "Blank", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(1f, 1.5f, false), Types.Sequence.Serial); LogicSet logicSet9 = new LogicSet(this); logicSet9.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.5f, 0.9f, false), Types.Sequence.Serial); LogicSet logicSet10 = new LogicSet(this); logicSet10.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet10.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet10.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyBlobBossJump_Character", false, false), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "BeforeJump", false), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(this.JumpDelay, false), Types.Sequence.Serial); logicSet10.AddAction(new MoveLogicAction(this.m_target, true, base.Speed * 6.75f), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Jump" }), Types.Sequence.Serial); logicSet10.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyBlobBossAir_Character", true, true), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet10.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Blob_Land" }), Types.Sequence.Serial); logicSet10.AddAction(new MoveLogicAction(this.m_target, true, base.Speed), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyBlobBossJump_Character", false, false), Types.Sequence.Serial); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Jump", false), Types.Sequence.Serial); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyBlobBossIdle_Character", true, true), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet10.Tag = 2; LogicSet logicSet11 = new LogicSet(this); logicSet11.AddAction(new ChangeSpriteLogicAction("EnemyBlobBossAir_Character", true, true), Types.Sequence.Serial); logicSet11.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "FairyMove1", "FairyMove2", "FairyMove3" }), Types.Sequence.Serial); logicSet11.AddAction(new ChaseLogicAction(this.m_target, true, 1f, -1f), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet5 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet6 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet7, logicSet8, logicSet9, logicSet10 }); this.m_generalNeoLB.AddLogicSet(new LogicSet[] { logicSet11 }); this.m_generalBossCooldownLB.AddLogicSet(new LogicSet[] { logicSet7, logicSet8, logicSet9 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); this.logicBlocksToDispose.Add(this.m_generalNeoLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalBossCooldownLB); if (base.Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { base.SetCooldownLogicBlock(this.m_generalBossCooldownLB, new int[] { 40, 40, 20 }); this.ChangeSprite("EnemyBlobBossIdle_Character"); } else { base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 40, 40, 20 }); } base.InitializeLogic(); }
protected override void InitializeLogic() { var projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = m_target, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, CollidesWithTerrain = false, Scale = ProjectileScale }; var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character")); logicSet.AddAction(new DelayLogicAction(FireballDelay)); logicSet.AddAction(new Play3DSoundLogicAction(this, m_target, "Eyeball_ProjectileAttack")); logicSet.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false)); logicSet.AddAction(new DelayLogicAction(1f, 3f)); logicSet.Tag = 2; var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character")); logicSet2.AddAction(new DelayLogicAction(FireballDelay)); logicSet2.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet2.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet2.AddAction(new DelayLogicAction(0.15f)); logicSet2.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet2.AddAction(new DelayLogicAction(0.15f)); logicSet2.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet2.AddAction(new DelayLogicAction(0.15f)); logicSet2.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false)); logicSet2.AddAction(new DelayLogicAction(0.75f, 2f)); logicSet2.Tag = 2; var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character")); logicSet3.AddAction(new DelayLogicAction(FireballDelay)); logicSet3.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet3.AddAction(new DelayLogicAction(0.1f)); ThrowThreeProjectiles(logicSet3); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false)); logicSet3.AddAction(new DelayLogicAction(1f, 3f)); logicSet3.Tag = 2; var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character")); logicSet4.AddAction(new RunFunctionLogicAction(this, "LockEyeball")); logicSet4.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupilFire_Sprite")); logicSet4.AddAction(new DelayLogicAction(FireballDelay)); logicSet4.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet4.AddAction(new DelayLogicAction(0.1f)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ThrowCardinalProjectiles", 0, true, 0)); logicSet4.AddAction(new DelayLogicAction(3.15f)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false)); logicSet4.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupil_Sprite")); logicSet4.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball")); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character")); logicSet5.AddAction(new RunFunctionLogicAction(this, "LockEyeball")); logicSet5.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupilFire_Sprite")); logicSet5.AddAction(new DelayLogicAction(FireballDelay)); logicSet5.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet5.AddAction(new DelayLogicAction(0.1f)); logicSet5.AddAction(new RunFunctionLogicAction(this, "ThrowCardinalProjectilesNeo", 0, true, 0)); logicSet5.AddAction(new DelayLogicAction(3f)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false)); logicSet5.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupil_Sprite")); logicSet5.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball")); logicSet5.Tag = 2; var logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character")); logicSet6.AddAction(new RunFunctionLogicAction(this, "LockEyeball")); logicSet6.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupilFire_Sprite")); logicSet6.AddAction(new DelayLogicAction(FireballDelay)); logicSet6.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet6.AddAction(new DelayLogicAction(0.1f)); logicSet6.AddAction(new RunFunctionLogicAction(this, "ThrowSprayProjectiles", true)); logicSet6.AddAction(new DelayLogicAction(1.6f)); logicSet6.AddAction(new RunFunctionLogicAction(this, "ThrowSprayProjectiles", true)); logicSet6.AddAction(new DelayLogicAction(1.6f)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false)); logicSet6.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupil_Sprite")); logicSet6.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball")); logicSet6.Tag = 2; var logicSet7 = new LogicSet(this); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character")); logicSet7.AddAction(new RunFunctionLogicAction(this, "LockEyeball")); logicSet7.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupilFire_Sprite")); logicSet7.AddAction(new DelayLogicAction(FireballDelay)); logicSet7.AddAction(new Play3DSoundLogicAction(this, m_target, "EyeballFire1")); logicSet7.AddAction(new DelayLogicAction(0.1f)); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles")); logicSet7.AddAction(new DelayLogicAction(0.575f)); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles")); logicSet7.AddAction(new DelayLogicAction(0.575f)); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles")); logicSet7.AddAction(new DelayLogicAction(0.575f)); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles")); logicSet7.AddAction(new DelayLogicAction(0.575f)); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles")); logicSet7.AddAction(new DelayLogicAction(0.575f)); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false)); logicSet7.AddAction(new RunFunctionLogicAction(m_pupil, "ChangeSprite", "EnemyEyeballBossPupil_Sprite")); logicSet7.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball")); logicSet7.Tag = 2; var logicSet8 = new LogicSet(this); logicSet8.AddAction(new DelayLogicAction(0.2f, 0.5f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet8); m_generalAdvancedLB.AddLogicSet(logicSet2, logicSet8); m_generalExpertLB.AddLogicSet(logicSet3, logicSet8); m_generalMiniBossLB.AddLogicSet(logicSet4, logicSet6, logicSet7, logicSet8); m_generalCooldownLB.AddLogicSet(logicSet8); m_generalNeoLB.AddLogicSet(logicSet5, logicSet6, logicSet7, logicSet8); logicBlocksToDispose.Add(m_generalNeoLB); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); SetCooldownLogicBlock(m_generalCooldownLB, 100); projectileData.Dispose(); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character")); logicSet.AddAction(new ChaseLogicAction(m_target, new Vector2(-255f, -175f), new Vector2(255f, -75f), true, MoveDuration)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character")); logicSet2.AddAction(new ChaseLogicAction(m_target, false, MoveDuration)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyWizardIdle_Character")); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(0.5f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(true)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character")); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell")); logicSet4.AddAction(new RunFunctionLogicAction(this, "SummonFireball", null)); logicSet4.AddAction(new DelayLogicAction(SpellDelay)); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet4.AddAction(new DelayLogicAction(SpellInterval)); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet4.AddAction(new DelayLogicAction(SpellInterval)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ResetFireball", null)); logicSet4.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet4.AddAction(new DelayLogicAction(0.5f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(false)); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(true)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character")); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell")); logicSet5.AddAction(new RunFunctionLogicAction(this, "SummonFireball", null)); logicSet5.AddAction(new DelayLogicAction(SpellDelay)); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet5.AddAction(new DelayLogicAction(SpellInterval)); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet5.AddAction(new DelayLogicAction(SpellInterval)); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet5.AddAction(new DelayLogicAction(SpellInterval)); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet5.AddAction(new DelayLogicAction(SpellInterval)); logicSet5.AddAction(new RunFunctionLogicAction(this, "ResetFireball", null)); logicSet5.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet5.AddAction(new DelayLogicAction(0.5f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(false)); logicSet5.Tag = 2; var logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyWizardSpell_Character")); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "BeforeSpell")); logicSet6.AddAction(new RunFunctionLogicAction(this, "SummonFireball", null)); logicSet6.AddAction(new DelayLogicAction(SpellDelay)); logicSet6.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet6.AddAction(new DelayLogicAction(SpellInterval)); logicSet6.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet6.AddAction(new DelayLogicAction(SpellInterval)); logicSet6.AddAction(new RunFunctionLogicAction(this, "ResetFireball", null)); logicSet6.AddAction(new RunFunctionLogicAction(this, "CastFireball")); logicSet6.AddAction(new DelayLogicAction(0.5f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.Tag = 2; var logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet7.AddAction(new LockFaceDirectionLogicAction(true)); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f)); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyWizardTeleportOut_Character", false, false)); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "BeforeTeleport")); logicSet7.AddAction(new DelayLogicAction(TeleportDelay)); logicSet7.AddAction(new PlayAnimationLogicAction("TeleportStart", "End")); logicSet7.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", false)); logicSet7.AddAction(new DelayLogicAction(TeleportDuration)); logicSet7.AddAction(new TeleportLogicAction(m_target, new Vector2(-400f, -400f), new Vector2(400f, 400f))); logicSet7.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", true)); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyWizardTeleportIn_Character", true, false)); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f)); logicSet7.AddAction(new LockFaceDirectionLogicAction(false)); logicSet7.AddAction(new DelayLogicAction(0.5f)); m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet7); m_generalAdvancedLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet5, logicSet7); m_generalExpertLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet6, logicSet7); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalCooldownLB); var arg_738_1 = m_generalCooldownLB; var array = new int[3]; array[0] = 100; SetCooldownLogicBlock(arg_738_1, array); base.InitializeLogic(); }
protected override void InitializeLogic() { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = this.m_target, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = false, Scale = base.ProjectileScale }; LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Eyeball_ProjectileAttack" }), Types.Sequence.Serial); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, 3f, false), Types.Sequence.Serial); logicSet.Tag = 2; LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.75f, 2f, false), Types.Sequence.Serial); logicSet2.Tag = 2; LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEyeballFire_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); this.ThrowThreeProjectiles(logicSet3); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEyeballIdle_Character", false, false), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(1f, 3f, false), Types.Sequence.Serial); logicSet3.Tag = 2; LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "LockEyeball", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupilFire_Sprite" }), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "ThrowCardinalProjectiles", new object[] { 0, true, 0 }), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(3.15f, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupil_Sprite" }), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball", new object[0]), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "LockEyeball", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupilFire_Sprite" }), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "ThrowCardinalProjectilesNeo", new object[] { 0, true, 0 }), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(3f, false), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupil_Sprite" }), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball", new object[0]), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "LockEyeball", new object[0]), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupilFire_Sprite" }), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "ThrowSprayProjectiles", new object[] { true }), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(1.6f, false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "ThrowSprayProjectiles", new object[] { true }), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(1.6f, false), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupil_Sprite" }), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball", new object[0]), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossFire_Character", true, true), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "LockEyeball", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupilFire_Sprite" }), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet7.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "EyeballFire1" }), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.575f, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.575f, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.575f, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.575f, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowRandomProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.575f, false), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyEyeballBossEye_Character", false, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this.m_pupil, "ChangeSprite", new object[] { "EnemyEyeballBossPupil_Sprite" }), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "UnlockEyeball", new object[0]), Types.Sequence.Serial); logicSet7.Tag = 2; LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new DelayLogicAction(0.2f, 0.5f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet8 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet2, logicSet8 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet3, logicSet8 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet4, logicSet6, logicSet7, logicSet8 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet8 }); this.m_generalNeoLB.AddLogicSet(new LogicSet[] { logicSet5, logicSet6, logicSet7, logicSet8 }); this.logicBlocksToDispose.Add(this.m_generalNeoLB); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 100 }); projectileData.Dispose(); base.InitializeLogic(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyNinjaRun_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.25f, 0.85f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyNinjaRun_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.25f, 0.85f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyNinjaIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new StopAnimationLogicAction(), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.25f, 0.85f, false), Types.Sequence.Serial); ProjectileData projectileData = new ProjectileData(this) { SpriteName = "ShurikenProjectile1_Sprite", SourceAnchor = new Vector2(15f, 0f), Target = this.m_target, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 20f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = true, Scale = base.ProjectileScale }; LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyNinjaIdle_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.PauseBeforeProjectile, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyNinjaThrow_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(1, 3, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Ninja_ThrowStar_01", "Ninja_ThrowStar_02", "Ninja_ThrowStar_03" }), Types.Sequence.Serial); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(4, 5, false), Types.Sequence.Serial); logicSet4.AddAction(new DelayLogicAction(this.PauseAfterProjectile, false), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyNinjaIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.PauseBeforeProjectile, false), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyNinjaThrow_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction(1, 3, false), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Ninja_ThrowStar_01", "Ninja_ThrowStar_02", "Ninja_ThrowStar_03" }), Types.Sequence.Serial); logicSet5.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -10f; logicSet5.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = 10f; logicSet5.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction(4, 5, false), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(this.PauseAfterProjectile, false), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyNinjaIdle_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.PauseBeforeProjectile, false), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyNinjaThrow_Character", false, false), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction(1, 3, false), Types.Sequence.Serial); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Ninja_ThrowStar_01", "Ninja_ThrowStar_02", "Ninja_ThrowStar_03" }), Types.Sequence.Serial); projectileData.AngleOffset = 0f; logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -5f; logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = 5f; logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -25f; logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = 25f; logicSet6.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction(4, 5, false), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(this.PauseAfterProjectile, false), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "CreateLog", null), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(this.TeleportDelay, false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "CreateSmoke", null), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "IsWeighted", true), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet7.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet7.Tag = 2; LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet8.AddAction(new RunFunctionLogicAction(this, "CreateLog", null), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(this.TeleportDelay, false), Types.Sequence.Serial); logicSet8.AddAction(new RunFunctionLogicAction(this, "CreateSmoke", null), Types.Sequence.Serial); projectileData.Target = null; logicSet8.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Ninja_ThrowStar_01", "Ninja_ThrowStar_02", "Ninja_ThrowStar_03" }), Types.Sequence.Serial); projectileData.AngleOffset = 45f; logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = 135f; logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -45f; logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -135f; logicSet8.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "IsWeighted", true), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet8.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.15f, false), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet8.Tag = 2; this.m_basicTeleportAttackLB.AddLogicSet(new LogicSet[] { logicSet7 }); this.m_expertTeleportAttackLB.AddLogicSet(new LogicSet[] { logicSet8 }); this.logicBlocksToDispose.Add(this.m_basicTeleportAttackLB); this.logicBlocksToDispose.Add(this.m_expertTeleportAttackLB); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet5 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet6 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); LogicBlock arg_906_1 = this.m_generalCooldownLB; int[] array = new int[3]; array[0] = 50; array[1] = 50; base.SetCooldownLogicBlock(arg_906_1, array); projectileData.Dispose(); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightWalk_Character")); logicSet.AddAction(new MoveLogicAction(m_target, true)); logicSet.AddAction(new DelayLogicAction(0.2f, 1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightWalk_Character")); logicSet2.AddAction(new MoveLogicAction(m_target, false)); logicSet2.AddAction(new DelayLogicAction(0.2f, 1f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(0.2f, 1f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(true)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character")); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet4.AddAction(new DelayLogicAction(AttackThrustDelay)); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet4.AddAction(new MoveDirectionLogicAction(AttackThrustSpeed)); logicSet4.AddAction(new RunFunctionLogicAction(m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", this, 20, 0.3f)); logicSet4.AddAction(new PlayAnimationLogicAction("AttackStart", "End"), Types.Sequence.Parallel); logicSet4.AddAction(new DelayLogicAction(AttackThrustDuration)); logicSet4.AddAction(new MoveLogicAction(null, true, 0f)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet4.AddAction(new DelayLogicAction(0.3f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(false)); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(true)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character")); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet5.AddAction(new DelayLogicAction(AttackThrustDelayExpert)); logicSet5.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet5.AddAction(new MoveDirectionLogicAction(AttackThrustSpeedExpert)); logicSet5.AddAction(new RunFunctionLogicAction(m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", this, 20, 0.3f)); logicSet5.AddAction(new PlayAnimationLogicAction("AttackStart", "End"), Types.Sequence.Parallel); logicSet5.AddAction(new DelayLogicAction(AttackThrustDurationExpert)); logicSet5.AddAction(new MoveLogicAction(null, true, 0f)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet5.AddAction(new DelayLogicAction(0.3f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(false)); logicSet5.Tag = 2; var logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character")); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet6.AddAction(new DelayLogicAction(AttackThrustDelayMiniBoss)); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet6.AddAction(new MoveDirectionLogicAction(AttackThrustSpeedMiniBoss)); logicSet6.AddAction(new RunFunctionLogicAction(m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", this, 20, 0.3f)); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End"), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(AttackThrustDurationMiniBoss)); logicSet6.AddAction(new MoveLogicAction(null, true, 0f)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character")); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet6.AddAction(new DelayLogicAction(0.25f)); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet6.AddAction(new MoveDirectionLogicAction(AttackThrustSpeedMiniBoss)); logicSet6.AddAction(new RunFunctionLogicAction(m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", this, 20, 0.3f)); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End"), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(AttackThrustDurationMiniBoss)); logicSet6.AddAction(new MoveLogicAction(null, true, 0f)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack_Character")); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet6.AddAction(new DelayLogicAction(0.25f)); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet6.AddAction(new MoveDirectionLogicAction(AttackThrustSpeedMiniBoss)); logicSet6.AddAction(new RunFunctionLogicAction(m_levelScreen.ImpactEffectPool, "DisplayThrustDustEffect", this, 20, 0.3f)); logicSet6.AddAction(new PlayAnimationLogicAction("AttackStart", "End"), Types.Sequence.Parallel); logicSet6.AddAction(new DelayLogicAction(AttackThrustDurationMiniBoss)); logicSet6.AddAction(new MoveLogicAction(null, true, 0f)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet6.AddAction(new DelayLogicAction(0.3f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.Tag = 2; var projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(30f, 0f), Target = null, Speed = new Vector2(ProjectileSpeed, ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = Damage, AngleOffset = 0f, Angle = new Vector2(0f, 0f), Scale = ProjectileScale }; var logicSet7 = new LogicSet(this); logicSet7.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet7.AddAction(new LockFaceDirectionLogicAction(true)); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet7.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet7.AddAction(new DelayLogicAction(AttackProjectileDelay)); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnightAttack1")); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnight_Projectile")); logicSet7.AddAction(new FireProjectileLogicAction(m_levelScreen.ProjectileManager, projectileData)); logicSet7.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet7.AddAction(new DelayLogicAction(0.3f)); logicSet7.AddAction(new LockFaceDirectionLogicAction(false)); logicSet7.Tag = 2; var logicSet8 = new LogicSet(this); logicSet8.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet8.AddAction(new LockFaceDirectionLogicAction(true)); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet8.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet8.AddAction(new DelayLogicAction(AttackProjectileExpertDelay)); ThrowThreeProjectiles(logicSet8); logicSet8.AddAction(new DelayLogicAction(0.3f)); logicSet8.AddAction(new LockFaceDirectionLogicAction(false)); logicSet8.Tag = 2; var logicSet9 = new LogicSet(this); logicSet9.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet9.AddAction(new LockFaceDirectionLogicAction(true)); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet9.AddAction(new DelayLogicAction(AttackProjectileMinibossDelay)); logicSet9.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnight_Projectile")); logicSet9.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f)); ThrowTwoProjectiles(logicSet9); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet9.AddAction(new DelayLogicAction(0.05f)); ThrowThreeProjectiles(logicSet9); logicSet9.AddAction(new DelayLogicAction(0.05f)); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet9.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet9.AddAction(new DelayLogicAction(0.05f)); ThrowTwoProjectiles(logicSet9); logicSet9.AddAction(new DelayLogicAction(0.5f)); logicSet9.AddAction(new LockFaceDirectionLogicAction(false)); logicSet9.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f)); logicSet9.Tag = 2; var logicSet10 = new LogicSet(this); logicSet10.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet10.AddAction(new LockFaceDirectionLogicAction(true)); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet10.AddAction(new DelayLogicAction(AttackProjectileMinibossDelay)); logicSet10.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "SpearKnight_Projectile")); logicSet10.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f)); ThrowThreeProjectiles(logicSet10); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet10.AddAction(new DelayLogicAction(0.05f)); ThrowTwoProjectiles(logicSet10); logicSet10.AddAction(new DelayLogicAction(0.05f)); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightAttack2_Character")); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet10.AddAction(new DelayLogicAction(0.05f)); ThrowThreeProjectiles(logicSet10); logicSet10.AddAction(new DelayLogicAction(0.5f)); logicSet10.AddAction(new LockFaceDirectionLogicAction(false)); logicSet10.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f)); logicSet10.Tag = 2; var logicSet11 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemySpearKnightIdle_Character")); logicSet11.AddAction(new MoveLogicAction(m_target, false, 300f)); logicSet11.AddAction(new JumpLogicAction()); logicSet11.AddAction(new DelayLogicAction(0.3f)); logicSet11.AddAction(new GroundCheckLogicAction()); logicSet11.AddAction(new JumpLogicAction()); ThrowRapidProjectiles(logicSet11); ThrowRapidProjectiles(logicSet11); ThrowRapidProjectiles(logicSet11); logicSet11.AddAction(new GroundCheckLogicAction()); logicSet11.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet11.AddAction(new DelayLogicAction(0.1f)); logicSet11.AddAction(new JumpLogicAction()); ThrowRapidProjectiles(logicSet11); ThrowRapidProjectiles(logicSet11); ThrowRapidProjectiles(logicSet11); logicSet11.AddAction(new GroundCheckLogicAction()); logicSet11.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet11.Tag = 2; m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet7); m_generalAdvancedLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet7); m_generalExpertLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet5, logicSet8); m_generalMiniBossLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet6, logicSet9, logicSet10); m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); SetCooldownLogicBlock(m_generalCooldownLB, 55, 25, 20); projectileData.Dispose(); base.InitializeLogic(); }
private void ThrowThreeProjectiles(LogicSet ls) { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = this.m_target, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = false, Scale = base.ProjectileScale, Angle = new Vector2(0f, 0f) }; for (int i = 0; i <= 3; i++) { projectileData.AngleOffset = 0f; ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = 45f; ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = -45f; ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); ls.AddAction(new DelayLogicAction(0.1f, false), Types.Sequence.Serial); } projectileData.Dispose(); }
protected override void InitializeLogic() { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "PlantProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = true, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = true, Scale = base.ProjectileScale }; LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Squirm_01", "Enemy_Venus_Squirm_02", "Enemy_Venus_Squirm_03" }), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyPlantAttack_Character", false, false), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(1, base.TotalFrames - 1, false), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Attack_01" }), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-105f, -105f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(base.TotalFrames - 1, base.TotalFrames, false), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet.Tag = 2; LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyPlantAttack_Character", false, false), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction(1, base.TotalFrames - 1, false), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Attack_01" }), Types.Sequence.Serial); projectileData.Angle = new Vector2(-60f, -60f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-105f, -105f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-120f, -120f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new PlayAnimationLogicAction(base.TotalFrames - 1, base.TotalFrames, false), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet2.Tag = 2; LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyPlantAttack_Character", false, false), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction(1, base.TotalFrames - 1, false), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Attack_01" }), Types.Sequence.Serial); projectileData.Angle = new Vector2(-45f, -45f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-60f, -60f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-85f, -85f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-95f, -95f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-105f, -105f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-120f, -120f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-135f, -135f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet3.AddAction(new PlayAnimationLogicAction(base.TotalFrames - 1, base.TotalFrames, false), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet3.Tag = 2; LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyPlantAttack_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(1, base.TotalFrames - 1, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Attack_01" }), Types.Sequence.Serial); projectileData.Angle = new Vector2(-60f, -60f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-87f, -87f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-93f, -93f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-75f, -75f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-105f, -105f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-120f, -120f); logicSet4.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(base.TotalFrames - 1, base.TotalFrames, false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Squirm_01", "Enemy_Venus_Squirm_02", "Enemy_Venus_Squirm_03", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet6.AddAction(new DelayLogicAction(0.25f, 0.45f, false), Types.Sequence.Serial); LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Squirm_01", "Enemy_Venus_Squirm_02", "Enemy_Venus_Squirm_03", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet7.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.25f, 0.45f, false), Types.Sequence.Serial); LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Enemy_Venus_Squirm_01", "Enemy_Venus_Squirm_02", "Enemy_Venus_Squirm_03", "Blank", "Blank", "Blank" }), Types.Sequence.Serial); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemyPlantIdle_Character", true, true), Types.Sequence.Serial); logicSet8.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.25f, 0.45f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet2 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet3 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet4 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet5 }); this.m_generalCooldownExpertLB.AddLogicSet(new LogicSet[] { logicSet6, logicSet7, logicSet8 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); this.logicBlocksToDispose.Add(this.m_generalCooldownExpertLB); base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 100 }); if (base.Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { LogicBlock arg_AA5_1 = this.m_generalCooldownExpertLB; int[] array = new int[3]; array[0] = 50; array[1] = 50; base.SetCooldownLogicBlock(arg_AA5_1, array); } projectileData.Dispose(); base.InitializeLogic(); }
private void ThrowCardinalProjectiles(LogicSet ls) { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EyeballProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Scale = base.ProjectileScale, CollidesWithTerrain = false, Angle = new Vector2(0f, 0f) }; int num = CDGMath.RandomPlusMinus(); for (int i = 0; i <= 170; i += 10) { projectileData.AngleOffset = (float)(i * num); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = (float)(90 + i * num); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = (float)(180 + i * num); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.AngleOffset = (float)(270 + i * num); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); ls.AddAction(new DelayLogicAction(0.175f, false), Types.Sequence.Serial); } projectileData.Dispose(); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyEnergonWalk_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.2f, 0.75f, false), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyEnergonWalk_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.2f, 0.75f, false), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.2f, 0.75f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEnergonAttack_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "BeforeAttack", false), Types.Sequence.Serial); logicSet4.AddAction(new RunFunctionLogicAction(this, "FireCurrentTypeProjectile", new object[0]), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character", true, true), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEnergonAttack_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "BeforeAttack", false), Types.Sequence.Serial); logicSet5.AddAction(new RunFunctionLogicAction(this, "SwitchRandomType", new object[0]), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyEnergonIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new DelayLogicAction(2f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet4, logicSet5 }); this.m_generalCooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); this.logicBlocksToDispose.Add(this.m_generalCooldownLB); base.SetCooldownLogicBlock(this.m_generalCooldownLB, new int[] { 0, 0, 100 }); base.InitializeLogic(); }
private void ThrowThreeProjectiles(LogicSet ls) { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "BoneProjectile_Sprite", SourceAnchor = new Vector2(20f, -20f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = true, RotationSpeed = 10f, Damage = base.Damage, AngleOffset = 0f, Angle = new Vector2(-72f, -72f), CollidesWithTerrain = false, Scale = base.ProjectileScale }; ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Speed = new Vector2(this.ProjectileSpeed - 350f, this.ProjectileSpeed - 350f); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Speed = new Vector2(this.ProjectileSpeed + 350f, this.ProjectileSpeed + 350f); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Dispose(); }
public void Intro2() { this.m_inSecondPart = true; Tween.RunFunction(3f, this.Player.AttachedLevel, "LightningEffectTwice", new object[0]); LogicSet logicSet = new LogicSet(this.Player); logicSet.AddAction(new DelayLogicAction(5f, false), Types.Sequence.Serial); logicSet.AddAction(new MoveDirectionLogicAction(new Vector2(1f, 0f), -1f), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new PlayAnimationLogicAction(true), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.7f, false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this.Player, "CurrentSpeed", 0), Types.Sequence.Serial); this.Player.RunExternalLogicSet(logicSet); Tween.RunFunction(5.3f, this, "Intro3", new object[0]); }
protected override void InitializeLogic() { LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new DebugTraceLogicAction("WalkTowardSLS"), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.3f, 0.75f, false), Types.Sequence.Serial); logicSet.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet2 = new LogicSet(this); logicSet2.AddAction(new DebugTraceLogicAction("WalkAway"), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet2.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("PlayerWalking_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(0.2f, 0.75f, false), Types.Sequence.Serial); logicSet2.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet3 = new LogicSet(this); logicSet3.AddAction(new DebugTraceLogicAction("walkStop"), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet3.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("PlayerIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(0.25f, 0.5f, false), Types.Sequence.Serial); LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new DebugTraceLogicAction("attack"), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet4.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.05f), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("PlayerAttacking3_Character", false, false), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction(2, 4, false), Types.Sequence.Serial); logicSet4.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Player_Attack01", "Player_Attack02" }), Types.Sequence.Serial); logicSet4.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Serial); logicSet4.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet4.AddAction(new ChangeSpriteLogicAction("PlayerIdle_Character", true, true), Types.Sequence.Serial); logicSet4.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet4.Tag = 2; LogicSet logicSet5 = new LogicSet(this); logicSet5.AddAction(new DebugTraceLogicAction("moveattack"), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet5.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.05f), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("PlayerAttacking3_Character", false, false), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction(2, 4, false), Types.Sequence.Serial); logicSet5.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Player_Attack01", "Player_Attack02" }), Types.Sequence.Serial); logicSet5.AddAction(new PlayAnimationLogicAction("AttackStart", "End", false), Types.Sequence.Serial); logicSet5.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet5.AddAction(new ChangeSpriteLogicAction("PlayerIdle_Character", true, true), Types.Sequence.Serial); logicSet5.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet5.Tag = 2; LogicSet logicSet6 = new LogicSet(this); logicSet6.AddAction(new DebugTraceLogicAction("Throwing Daggers"), Types.Sequence.Serial); logicSet6.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet6.AddAction(new ChangeSpriteLogicAction("PlayerLevelUp_Character", true, true), Types.Sequence.Serial); logicSet6.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet6.AddAction(new RunFunctionLogicAction(this, "CastCloseShield", new object[0]), Types.Sequence.Serial); logicSet6.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet6.Tag = 2; LogicSet logicSet7 = new LogicSet(this); logicSet7.AddAction(new DebugTraceLogicAction("Throwing Daggers"), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet7.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", false), Types.Sequence.Serial); logicSet7.AddAction(new ChangeSpriteLogicAction("PlayerLevelUp_Character", true, true), Types.Sequence.Serial); logicSet7.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet7.AddAction(new RunFunctionLogicAction(this, "ThrowDaggerProjectiles", new object[0]), Types.Sequence.Serial); logicSet7.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet7.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet7.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet7.Tag = 2; LogicSet logicSet8 = new LogicSet(this); logicSet8.AddAction(new DebugTraceLogicAction("Throwing Daggers"), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet8.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.0333333351f), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", false), Types.Sequence.Serial); logicSet8.AddAction(new ChangeSpriteLogicAction("PlayerLevelUp_Character", true, true), Types.Sequence.Serial); logicSet8.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Serial); logicSet8.AddAction(new RunFunctionLogicAction(this, "ThrowDaggerProjectilesNeo", new object[0]), Types.Sequence.Serial); logicSet8.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet8.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet8.AddAction(new ChangePropertyLogicAction(this, "AnimationDelay", 0.1f), Types.Sequence.Serial); logicSet8.Tag = 2; LogicSet logicSet9 = new LogicSet(this); logicSet9.AddAction(new DebugTraceLogicAction("jumpLS"), Types.Sequence.Serial); logicSet9.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet9.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet9.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet9.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Player_Jump" }), Types.Sequence.Serial); logicSet9.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet9.AddAction(new RunFunctionLogicAction(this, "ThrowAxeProjectiles", new object[0]), Types.Sequence.Serial); logicSet9.AddAction(new DelayLogicAction(0.75f, false), Types.Sequence.Serial); logicSet9.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet9.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); LogicSet logicSet10 = new LogicSet(this); logicSet10.AddAction(new DebugTraceLogicAction("jumpLS"), Types.Sequence.Serial); logicSet10.AddAction(new ChangePropertyLogicAction(this, "CanBeKnockedBack", true), Types.Sequence.Serial); logicSet10.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet10.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet10.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Player_Jump" }), Types.Sequence.Serial); logicSet10.AddAction(new JumpLogicAction(0f), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.2f, false), Types.Sequence.Serial); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowAxeProjectilesNeo", new object[0]), Types.Sequence.Serial); logicSet10.AddAction(new DelayLogicAction(0.75f, false), Types.Sequence.Serial); logicSet10.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); logicSet10.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); LogicSet logicSet11 = new LogicSet(this); logicSet11.AddAction(new DebugTraceLogicAction("dashLS"), Types.Sequence.Serial); logicSet11.AddAction(new RunFunctionLogicAction(this, "CastCloseShield", new object[0]), Types.Sequence.Serial); logicSet11.AddAction(new RunFunctionLogicAction(this, "Dash", new object[] { 0 }), Types.Sequence.Serial); logicSet11.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet11.AddAction(new RunFunctionLogicAction(this, "DashComplete", new object[0]), Types.Sequence.Serial); LogicSet logicSet12 = new LogicSet(this); logicSet12.AddAction(new DebugTraceLogicAction("dashAwayRightLS"), Types.Sequence.Serial); logicSet12.AddAction(new RunFunctionLogicAction(this, "Dash", new object[] { 1 }), Types.Sequence.Serial); logicSet12.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet12.AddAction(new RunFunctionLogicAction(this, "DashComplete", new object[0]), Types.Sequence.Serial); LogicSet logicSet13 = new LogicSet(this); logicSet13.AddAction(new DebugTraceLogicAction("dashAwayLeftLS"), Types.Sequence.Serial); logicSet13.AddAction(new RunFunctionLogicAction(this, "Dash", new object[] { -1 }), Types.Sequence.Serial); logicSet13.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet13.AddAction(new RunFunctionLogicAction(this, "DashComplete", new object[0]), Types.Sequence.Serial); LogicSet logicSet14 = new LogicSet(this); logicSet14.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet14.AddAction(new ChangeSpriteLogicAction("EnemyLastBossRun_Character", true, true), Types.Sequence.Serial); logicSet14.AddAction(new MoveLogicAction(this.m_target, true, -1f), Types.Sequence.Serial); logicSet14.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet14.AddAction(new DelayLogicAction(0.35f, 1.15f, false), Types.Sequence.Serial); logicSet14.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet15 = new LogicSet(this); logicSet15.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet15.AddAction(new ChangeSpriteLogicAction("EnemyLastBossRun_Character", true, true), Types.Sequence.Serial); logicSet15.AddAction(new MoveLogicAction(this.m_target, false, -1f), Types.Sequence.Serial); logicSet15.AddAction(new DelayLogicAction(0.2f, 1f, false), Types.Sequence.Serial); logicSet15.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet16 = new LogicSet(this); logicSet16.AddAction(new GroundCheckLogicAction(), Types.Sequence.Serial); logicSet16.AddAction(new ChangeSpriteLogicAction("EnemyLastBossIdle_Character", true, true), Types.Sequence.Serial); logicSet16.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet16.AddAction(new DelayLogicAction(0.2f, 0.5f, false), Types.Sequence.Serial); LogicSet logicSet17 = new LogicSet(this); logicSet17.AddAction(new MoveLogicAction(this.m_target, true, 0f), Types.Sequence.Serial); logicSet17.AddAction(new LockFaceDirectionLogicAction(true, 0), Types.Sequence.Serial); logicSet17.AddAction(new ChangeSpriteLogicAction("EnemyLastBossAttack_Character", false, false), Types.Sequence.Serial); logicSet17.AddAction(new PlayAnimationLogicAction("Start", "BeforeAttack", false), Types.Sequence.Serial); logicSet17.AddAction(new DelayLogicAction(this.m_lastBossAttackDelay, false), Types.Sequence.Serial); logicSet17.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSwing" }), Types.Sequence.Serial); logicSet17.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_Effort_01", "FinalBoss_St2_Effort_02", "FinalBoss_St2_Effort_03", "FinalBoss_St2_Effort_04", "FinalBoss_St2_Effort_05" }), Types.Sequence.Serial); logicSet17.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); logicSet17.AddAction(new ChangeSpriteLogicAction("EnemyLastBossIdle_Character", true, true), Types.Sequence.Serial); logicSet17.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet18 = new LogicSet(this); this.RunTeleportLS(logicSet18, "Centre"); logicSet18.AddAction(new ChangeSpriteLogicAction("EnemyLastBossSpell_Character", false, false), Types.Sequence.Serial); logicSet18.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam_Prime" }), Types.Sequence.Serial); logicSet18.AddAction(new PlayAnimationLogicAction("Start", "BeforeCast", false), Types.Sequence.Serial); logicSet18.AddAction(new DelayLogicAction(this.m_castDelay, false), Types.Sequence.Serial); logicSet18.AddAction(new RunFunctionLogicAction(this, "CastSpears", new object[] { this.m_numSpears, this.m_spearDuration }), Types.Sequence.Serial); logicSet18.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam" }), Types.Sequence.Serial); logicSet18.AddAction(new PlayAnimationLogicAction("BeforeCast", "End", false), Types.Sequence.Serial); logicSet18.AddAction(new DelayLogicAction(this.m_spearDuration + 1f, false), Types.Sequence.Serial); LogicSet logicSet19 = new LogicSet(this); logicSet19.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0), Types.Sequence.Serial); logicSet19.AddAction(new ChangeSpriteLogicAction("EnemyLastBossSpell2_Character", false, false), Types.Sequence.Serial); logicSet19.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSummon_a" }), Types.Sequence.Serial); logicSet19.AddAction(new PlayAnimationLogicAction("Start", "Cast", false), Types.Sequence.Serial); logicSet19.AddAction(new DelayLogicAction(this.m_castDelay, false), Types.Sequence.Serial); logicSet19.AddAction(new RunFunctionLogicAction(this, "CastSwordsRandom", new object[0]), Types.Sequence.Serial); logicSet19.AddAction(new PlayAnimationLogicAction("Cast", "End", false), Types.Sequence.Serial); logicSet19.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); LogicSet logicSet20 = new LogicSet(this); logicSet20.AddAction(new LockFaceDirectionLogicAction(true, 1), Types.Sequence.Serial); this.RunTeleportLS(logicSet20, "Left"); logicSet20.AddAction(new ChangeSpriteLogicAction("EnemyLastBossSpell_Character", false, false), Types.Sequence.Serial); logicSet20.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam_Prime" }), Types.Sequence.Serial); logicSet20.AddAction(new PlayAnimationLogicAction("Start", "BeforeCast", false), Types.Sequence.Serial); logicSet20.AddAction(new DelayLogicAction(this.m_castDelay, false), Types.Sequence.Serial); logicSet20.AddAction(new RunFunctionLogicAction(this, "CastSwords", new object[] { true }), Types.Sequence.Serial); logicSet20.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam" }), Types.Sequence.Serial); logicSet20.AddAction(new PlayAnimationLogicAction("BeforeCast", "End", false), Types.Sequence.Serial); logicSet20.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); logicSet20.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet21 = new LogicSet(this); logicSet21.AddAction(new LockFaceDirectionLogicAction(true, -1), Types.Sequence.Serial); this.RunTeleportLS(logicSet21, "Right"); logicSet21.AddAction(new ChangeSpriteLogicAction("EnemyLastBossSpell_Character", false, false), Types.Sequence.Serial); logicSet21.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam_Prime" }), Types.Sequence.Serial); logicSet21.AddAction(new PlayAnimationLogicAction("Start", "BeforeCast", false), Types.Sequence.Serial); logicSet21.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_BlockLaugh" }), Types.Sequence.Serial); logicSet21.AddAction(new DelayLogicAction(this.m_castDelay, false), Types.Sequence.Serial); logicSet21.AddAction(new RunFunctionLogicAction(this, "CastSwords", new object[] { false }), Types.Sequence.Serial); logicSet21.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_SwordSlam" }), Types.Sequence.Serial); logicSet21.AddAction(new PlayAnimationLogicAction("BeforeCast", "End", false), Types.Sequence.Serial); logicSet21.AddAction(new DelayLogicAction(1f, false), Types.Sequence.Serial); logicSet21.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet22 = new LogicSet(this); logicSet22.AddAction(new RunFunctionLogicAction(this, "CastDamageShield", new object[] { this.m_orbsEasy }), Types.Sequence.Serial); logicSet22.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet23 = new LogicSet(this); logicSet23.AddAction(new RunFunctionLogicAction(this, "CastDamageShield", new object[] { this.m_orbsNormal }), Types.Sequence.Serial); logicSet23.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); LogicSet logicSet24 = new LogicSet(this); logicSet24.AddAction(new RunFunctionLogicAction(this, "CastDamageShield", new object[] { this.m_orbsHard }), Types.Sequence.Serial); logicSet24.AddAction(new DelayLogicAction(0f, false), Types.Sequence.Serial); logicSet24.AddAction(new LockFaceDirectionLogicAction(false, 0), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet9, logicSet5, logicSet6, logicSet7, logicSet11 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet14, logicSet15, logicSet16, logicSet17, logicSet18, logicSet19, logicSet20, logicSet21 }); this.m_damageShieldLB.AddLogicSet(new LogicSet[] { logicSet22, logicSet23, logicSet24 }); this.m_cooldownLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet9, logicSet5, logicSet6, logicSet7, logicSet11 }); this.m_secondFormCooldownLB.AddLogicSet(new LogicSet[] { logicSet14, logicSet15, logicSet16 }); this.m_generalBasicNeoLB.AddLogicSet(new LogicSet[] { logicSet, logicSet2, logicSet3, logicSet10, logicSet5, logicSet6, logicSet8, logicSet11 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_damageShieldLB); this.logicBlocksToDispose.Add(this.m_cooldownLB); this.logicBlocksToDispose.Add(this.m_secondFormCooldownLB); this.logicBlocksToDispose.Add(this.m_generalBasicNeoLB); this.m_firstFormDashAwayLB.AddLogicSet(new LogicSet[] { logicSet13, logicSet12 }); this.logicBlocksToDispose.Add(this.m_firstFormDashAwayLB); LogicBlock arg_139D_1 = this.m_cooldownLB; int[] array = new int[8]; array[0] = 70; array[2] = 30; base.SetCooldownLogicBlock(arg_139D_1, array); base.InitializeLogic(); }
protected override void InitializeLogic() { float rotation = base.Rotation; float num = base.ParseTagToFloat("delay"); float num2 = base.ParseTagToFloat("speed"); if (num == 0f) { Console.WriteLine("ERROR: Turret set with delay of 0. Shoots too fast."); num = 10000f; } ProjectileData projectileData = new ProjectileData(this) { SpriteName = "TurretProjectile_Sprite", SourceAnchor = Vector2.Zero, Target = null, Speed = new Vector2(num2, num2), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Angle = new Vector2(rotation, rotation), CollidesWithTerrain = true, Scale = base.ProjectileScale }; LogicSet logicSet = new LogicSet(this); logicSet.AddAction(new PlayAnimationLogicAction(false), Types.Sequence.Parallel); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "Turret_Attack01", "Turret_Attack02", "Turret_Attack03" }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(num, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); projectileData.Dispose(); base.InitializeLogic(); }
private void RunTeleportLS(LogicSet logicSet, string roomPosition) { logicSet.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "IsWeighted", false), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "Opacity", 0.5f), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "CurrentSpeed", 0), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyLastBossTeleport_Character", false, false), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, this.m_target, new string[] { "FinalBoss_St2_BlockAction" }), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(0.25f, false), Types.Sequence.Serial); logicSet.AddAction(new RunFunctionLogicAction(this, "TeleportTo", new object[] { roomPosition }), Types.Sequence.Serial); logicSet.AddAction(new DelayObjLogicAction(this.m_delayObj), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "IsCollidable", true), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "IsWeighted", true), Types.Sequence.Serial); logicSet.AddAction(new ChangePropertyLogicAction(this, "Opacity", 1), Types.Sequence.Serial); }
public void MovePlayerTo() { this.m_target.StopAllSpells(); this.m_levelScreen.ProjectileManager.DestroyAllProjectiles(true); this.m_inSecondForm = true; this.m_isKilled = true; this.m_levelScreen.RunCinematicBorders(16f); this.m_currentActiveLB.StopLogicBlock(); int num = 250; Vector2 zero = Vector2.Zero; if ((this.m_target.X < base.X && base.X > this.m_levelScreen.CurrentRoom.X + 500f) || base.X > (float)(this.m_levelScreen.CurrentRoom.Bounds.Right - 500)) { zero = new Vector2(base.X - (float)num, base.Y); if (zero.X > (float)(this.m_levelScreen.CurrentRoom.Bounds.Right - 500)) { zero.X = (float)(this.m_levelScreen.CurrentRoom.Bounds.Right - 500); } } else { zero = new Vector2(base.X + (float)num, base.Y); } this.m_target.Flip = SpriteEffects.None; if (zero.X < this.m_target.X) { this.m_target.Flip = SpriteEffects.FlipHorizontally; } float num2 = CDGMath.DistanceBetweenPts(this.m_target.Position, zero) / this.m_target.Speed; this.m_target.UpdateCollisionBoxes(); this.m_target.State = 1; this.m_target.IsWeighted = false; this.m_target.AccelerationY = 0f; this.m_target.AccelerationX = 0f; this.m_target.IsCollidable = false; this.m_target.Y = (float)(this.m_levelScreen.CurrentRoom.Bounds.Bottom - 180) - ((float)this.m_target.Bounds.Bottom - this.m_target.Y); this.m_target.CurrentSpeed = 0f; this.m_target.LockControls(); this.m_target.ChangeSprite("PlayerWalking_Character"); LogicSet logicSet = new LogicSet(this.m_target); logicSet.AddAction(new DelayLogicAction(num2, false), Types.Sequence.Serial); this.m_target.RunExternalLogicSet(logicSet); this.m_target.PlayAnimation(true); Tween.To(this.m_target, num2, new Easing(Tween.EaseNone), new string[] { "X", zero.X.ToString() }); Tween.AddEndHandlerToLastTween(this, "SecondFormDeath", new object[0]); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyGhostChase_Character")); logicSet.AddAction(new ChaseLogicAction(m_target, true, 2f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyGhostChase_Character")); logicSet2.AddAction(new ChaseLogicAction(m_target, false, 1f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyGhostIdle_Character")); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(1f, 2f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new MoveLogicAction(m_target, true)); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyGhostDashPrep_Character")); logicSet5.AddAction(new DelayLogicAction(DashDelay)); logicSet5.AddAction(new RunFunctionLogicAction(this, "TurnToPlayer", null)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyGhostDash_Character")); logicSet5.AddAction(new LockFaceDirectionLogicAction(true)); logicSet5.AddAction(new MoveLogicAction(m_target, true, DashSpeed)); logicSet5.AddAction(new DelayLogicAction(DashDuration)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyGhostIdle_Character")); logicSet5.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(false)); logicSet5.AddAction(new DelayLogicAction(0.75f)); logicSet5.Tag = 2; var logicSet6 = new LogicSet(this); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyGhostDashPrep_Character")); logicSet6.AddAction(new DelayLogicAction(DashDelay)); logicSet6.AddAction(new RunFunctionLogicAction(this, "TurnToPlayer", null)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyGhostDash_Character")); ThrowProjectiles(logicSet6, true); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new MoveLogicAction(m_target, true, DashSpeed)); logicSet6.AddAction(new DelayLogicAction(DashDuration)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyGhostIdle_Character")); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.AddAction(new DelayLogicAction(0.75f)); logicSet6.Tag = 2; var logicSet7 = new LogicSet(this); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyGhostBossIdle_Character")); logicSet7.AddAction(new ChaseLogicAction(m_target, true, 2f)); var logicSet8 = new LogicSet(this); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemyGhostBossIdle_Character")); logicSet8.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet8.AddAction(new DelayLogicAction(1f, 2f)); var logicSet9 = new LogicSet(this); logicSet9.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet9.AddAction(new LockFaceDirectionLogicAction(true)); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemyGhostBossDashPrep_Character")); logicSet9.AddAction(new DelayLogicAction(DashDelay)); logicSet9.AddAction(new RunFunctionLogicAction(this, "TurnToPlayer", null)); logicSet9.AddAction(new ChangeSpriteLogicAction("EnemyGhostBossIdle_Character")); logicSet9.AddAction(new RunFunctionLogicAction(this, "ChangeFlameDirection")); logicSet9.AddAction(new MoveLogicAction(m_target, true, DashSpeed)); logicSet9.AddAction(new DelayLogicAction(DashDuration)); logicSet9.AddAction(new ChangePropertyLogicAction(_objectList[0], "Rotation", 0)); logicSet9.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet9.AddAction(new LockFaceDirectionLogicAction(false)); logicSet9.AddAction(new DelayLogicAction(0.75f)); logicSet5.Tag = 2; m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet5); m_generalAdvancedLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet5); m_generalExpertLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4, logicSet6); m_generalMiniBossLB.AddLogicSet(logicSet7, logicSet2, logicSet8, logicSet4, logicSet9); m_generalNeoLB.AddLogicSet(logicSet7, logicSet2, logicSet8, logicSet4, logicSet9); logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalNeoLB); var arg_600_1 = m_generalBasicLB; var array = new int[5]; array[0] = 100; SetCooldownLogicBlock(arg_600_1, array); base.InitializeLogic(); }
protected override void InitializeLogic() { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "TurretProjectile_Sprite", SourceAnchor = Vector2.Zero, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, CollidesWithTerrain = true, Scale = base.ProjectileScale }; LogicSet logicSet = new LogicSet(this); projectileData.Angle = new Vector2(0f, 0f); logicSet.AddAction(new RunFunctionLogicAction(this, "FireAnimation", new object[0]), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Eyeball_ProjectileAttack" }), Types.Sequence.Serial); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(90f, 90f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(180f, 180f); logicSet.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyStarburstIdle_Character", true, true), Types.Sequence.Serial); logicSet.AddAction(new DelayLogicAction(1f, 1f, false), Types.Sequence.Serial); logicSet.Tag = 2; LogicSet logicSet2 = new LogicSet(this); projectileData.Angle = new Vector2(45f, 45f); logicSet2.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet2.AddAction(new RunFunctionLogicAction(this, "FireAnimation", new object[0]), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet2.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Eyeball_ProjectileAttack" }), Types.Sequence.Serial); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-45f, -45f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(135f, 135f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-135f, -135f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(90f, 90f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(180f, 180f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(0f, 0f); logicSet2.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyStarburstIdle_Character", true, true), Types.Sequence.Serial); logicSet2.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet2.AddAction(new DelayLogicAction(1f, 1f, false), Types.Sequence.Serial); logicSet2.Tag = 2; LogicSet logicSet3 = new LogicSet(this); projectileData.Angle = new Vector2(45f, 45f); projectileData.CollidesWithTerrain = false; projectileData.SpriteName = "GhostProjectile_Sprite"; logicSet3.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet3.AddAction(new RunFunctionLogicAction(this, "FireAnimation", new object[0]), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(this.FireballDelay, false), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Eyeball_ProjectileAttack" }), Types.Sequence.Serial); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-45f, -45f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(135f, 135f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-135f, -135f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-90f, -90f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(90f, 90f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(180f, 180f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(0f, 0f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyStarburstIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(1f, 1f, false), Types.Sequence.Serial); logicSet3.AddAction(new RunFunctionLogicAction(this, "FireAnimation", new object[0]), Types.Sequence.Serial); logicSet3.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "Eyeball_ProjectileAttack" }), Types.Sequence.Serial); projectileData.Angle = new Vector2(25f, 25f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-25f, -25f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(115f, 115f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-115f, -115f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-70f, -70f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(70f, 70f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(160f, 160f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-160f, -160f); logicSet3.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); logicSet3.AddAction(new ChangeSpriteLogicAction("EnemyStarburstIdle_Character", true, true), Types.Sequence.Serial); logicSet3.AddAction(new ChangePropertyLogicAction(this._objectList[1], "Rotation", 45), Types.Sequence.Serial); logicSet3.AddAction(new DelayLogicAction(1.25f, 1.25f, false), Types.Sequence.Serial); logicSet3.Tag = 2; LogicSet logicSet4 = new LogicSet(this); logicSet4.AddAction(new DelayLogicAction(0.5f, 0.5f, false), Types.Sequence.Serial); this.m_generalBasicLB.AddLogicSet(new LogicSet[] { logicSet, logicSet4 }); this.m_generalAdvancedLB.AddLogicSet(new LogicSet[] { logicSet2, logicSet4 }); this.m_generalExpertLB.AddLogicSet(new LogicSet[] { logicSet3, logicSet4 }); this.m_generalMiniBossLB.AddLogicSet(new LogicSet[] { logicSet2, logicSet4 }); this.logicBlocksToDispose.Add(this.m_generalBasicLB); this.logicBlocksToDispose.Add(this.m_generalAdvancedLB); this.logicBlocksToDispose.Add(this.m_generalExpertLB); this.logicBlocksToDispose.Add(this.m_generalMiniBossLB); projectileData.Dispose(); base.InitializeLogic(); }
protected override void InitializeLogic() { var logicSet = new LogicSet(this); logicSet.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostMove_Character")); logicSet.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "FairyMove1", "FairyMove2", "FairyMove3")); logicSet.AddAction(new ChaseLogicAction(m_target, true, 1f)); var logicSet2 = new LogicSet(this); logicSet2.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet2.AddAction(new ChaseLogicAction(m_target, false, 0.5f)); var logicSet3 = new LogicSet(this); logicSet3.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet3.AddAction(new DelayLogicAction(0.5f, 0.75f)); var logicSet4 = new LogicSet(this); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet4.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(true)); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostShoot_Character", false, false)); logicSet4.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet4.AddAction(new DelayLogicAction(AttackDelay)); logicSet4.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", false)); logicSet4.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet4.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet4.AddAction(new DelayLogicAction(0.25f)); logicSet4.AddAction(new LockFaceDirectionLogicAction(false)); logicSet4.Tag = 2; var logicSet5 = new LogicSet(this); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet5.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(true)); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostShoot_Character", false, false)); logicSet5.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet5.AddAction(new DelayLogicAction(AttackDelay)); logicSet5.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", false)); logicSet5.AddAction(new DelayLogicAction(0.15f)); logicSet5.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", false)); logicSet5.AddAction(new DelayLogicAction(0.15f)); logicSet5.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", false)); logicSet5.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet5.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet5.AddAction(new DelayLogicAction(0.25f)); logicSet5.AddAction(new LockFaceDirectionLogicAction(false)); logicSet5.Tag = 2; var logicSet6 = new LogicSet(this); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet6.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(true)); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostShoot_Character", false, false)); logicSet6.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet6.AddAction(new DelayLogicAction(AttackDelay)); ThrowEightProjectiles(logicSet6); logicSet6.AddAction(new DelayLogicAction(0.25f)); ThrowEightProjectiles(logicSet6); logicSet6.AddAction(new DelayLogicAction(0.25f)); ThrowEightProjectiles(logicSet6); logicSet6.AddAction(new DelayLogicAction(0.25f)); ThrowEightProjectiles(logicSet6); logicSet6.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet6.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostIdle_Character")); logicSet6.AddAction(new DelayLogicAction(0.25f)); logicSet6.AddAction(new LockFaceDirectionLogicAction(false)); logicSet6.Tag = 2; var logicSet7 = new LogicSet(this); logicSet7.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossMove_Character")); logicSet7.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, "FairyMove1", "FairyMove2", "FairyMove3")); logicSet7.AddAction(new ChaseLogicAction(m_target, true, 1f)); var logicSet8 = new LogicSet(this); logicSet8.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossIdle_Character")); logicSet8.AddAction(new ChaseLogicAction(m_target, false, 0.5f)); var logicSet9 = new LogicSet(this); logicSet9.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet9.AddAction(new DelayLogicAction(0.5f, 0.75f)); var logicSet10 = new LogicSet(this); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossIdle_Character")); logicSet10.AddAction(new MoveLogicAction(m_target, true, 0f)); logicSet10.AddAction(new LockFaceDirectionLogicAction(true)); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossShoot_Character", false, false)); logicSet10.AddAction(new PlayAnimationLogicAction("Start", "Windup")); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossIdle_Character")); logicSet10.AddAction(new DelayLogicAction(AttackDelay)); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossShoot_Character", false, false)); logicSet10.AddAction(new PlayAnimationLogicAction("Attack", "End")); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossMove_Character")); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new RunFunctionLogicAction(this, "ThrowFourProjectiles", true)); logicSet10.AddAction(new ChangeSpriteLogicAction("EnemyFairyGhostBossIdle_Character")); logicSet10.AddAction(new DelayLogicAction(0.25f)); logicSet10.AddAction(new LockFaceDirectionLogicAction(false)); logicSet10.Tag = 2; m_generalBasicLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet4); m_generalAdvancedLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet5); m_generalExpertLB.AddLogicSet(logicSet, logicSet2, logicSet3, logicSet6); m_generalMiniBossLB.AddLogicSet(logicSet7, logicSet8, logicSet9, logicSet10); m_generalNeoLB.AddLogicSet(logicSet7, logicSet8, logicSet9, logicSet10); if (Difficulty == GameTypes.EnemyDifficulty.MINIBOSS) { m_generalCooldownLB.AddLogicSet(logicSet7, logicSet8, logicSet9); } else { m_generalCooldownLB.AddLogicSet(logicSet, logicSet2, logicSet3); } logicBlocksToDispose.Add(m_generalBasicLB); logicBlocksToDispose.Add(m_generalAdvancedLB); logicBlocksToDispose.Add(m_generalExpertLB); logicBlocksToDispose.Add(m_generalMiniBossLB); logicBlocksToDispose.Add(m_generalCooldownLB); logicBlocksToDispose.Add(m_generalNeoLB); var arg_975_1 = m_generalCooldownLB; var array = new int[3]; array[0] = 70; array[1] = 30; SetCooldownLogicBlock(arg_975_1, array); base.InitializeLogic(); }
private void ThrowTwoProjectiles(LogicSet ls) { ProjectileData projectileData = new ProjectileData(this) { SpriteName = "EnemySpearKnightWave_Sprite", SourceAnchor = new Vector2(30f, 0f), Target = null, Speed = new Vector2(this.ProjectileSpeed, this.ProjectileSpeed), IsWeighted = false, RotationSpeed = 0f, Damage = base.Damage, AngleOffset = 0f, Angle = new Vector2(22f, 22f) }; ls.AddAction(new Play3DSoundLogicAction(this, Game.ScreenManager.Player, new string[] { "SpearKnightAttack1" }), Types.Sequence.Serial); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); projectileData.Angle = new Vector2(-22f, -22f); ls.AddAction(new FireProjectileLogicAction(this.m_levelScreen.ProjectileManager, projectileData), Types.Sequence.Serial); ls.AddAction(new PlayAnimationLogicAction("Attack", "End", false), Types.Sequence.Serial); projectileData.Dispose(); }