コード例 #1
0
        public void SummonFireball()
        {
            ResetFireball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardFireballProjectile_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = m_target,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                Scale               = MiniBossFireballSize
            };

            if (Difficulty == GameTypes.EnemyDifficulty.EXPERT)
            {
                projectileData.SpriteName = "GhostBossProjectile_Sprite";
            }
            SoundManager.Play3DSound(this, m_target, "Fire_Wizard_Form");
            m_fireballSummon                = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_fireballSummon.Opacity        = 0f;
            m_fireballSummon.Scale          = Vector2.Zero;
            m_fireballSummon.AnimationDelay = 0.1f;
            m_fireballSummon.PlayAnimation();
            m_fireballSummon.Rotation = 0f;
            Tween.To(m_fireballSummon, 0.5f, Back.EaseOut, "Opacity", "1", "ScaleX", MiniBossFireballSize.X.ToString(),
                     "ScaleY", MiniBossFireballSize.Y.ToString());
            projectileData.Dispose();
        }
コード例 #2
0
 public EnemyObj_BallAndChain(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyFlailKnight_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     this.m_ballAndChain = new ProjectileObj("EnemyFlailKnightBall_Sprite");
     this.m_ballAndChain.IsWeighted = false;
     this.m_ballAndChain.CollidesWithTerrain = false;
     this.m_ballAndChain.IgnoreBoundsCheck = true;
     this.m_ballAndChain.OutlineWidth = 2;
     this.m_ballAndChain2 = (this.m_ballAndChain.Clone() as ProjectileObj);
     this.m_chain = new SpriteObj("EnemyFlailKnightLink_Sprite");
     this.m_chainLinksList = new List<Vector2>();
     this.m_chainLinks2List = new List<Vector2>();
     for (int i = 0; i < this.m_numChainLinks; i++)
     {
         this.m_chainLinksList.Add(default(Vector2));
     }
     for (int j = 0; j < this.m_numChainLinks / 2; j++)
     {
         this.m_chainLinks2List.Add(default(Vector2));
     }
     this.Type = 1;
     this.TintablePart = this._objectList[3];
     this.m_walkSound = new FrameSoundObj(this, this.m_target, 1, new string[]
     {
         "KnightWalk1",
         "KnightWalk2"
     });
     this.m_walkSound2 = new FrameSoundObj(this, this.m_target, 6, new string[]
     {
         "KnightWalk1",
         "KnightWalk2"
     });
 }
コード例 #3
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_fireballSummon = null;
         m_iceballSummon  = null;
         if (m_earthSummonInSprite != null)
         {
             m_earthSummonInSprite.Dispose();
             m_earthSummonInSprite = null;
         }
         if (m_earthSummonOutSprite != null)
         {
             m_earthSummonOutSprite.Dispose();
             m_earthSummonOutSprite = null;
         }
         if (m_earthProjectileObj != null)
         {
             m_earthProjectileObj.Dispose();
             m_earthProjectileObj = null;
         }
         SpawnRoom = null;
         base.Dispose();
     }
 }
コード例 #4
0
 public EnemyObj_BallAndChain(PlayerObj target, PhysicsManager physicsManager,
                              ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyFlailKnight_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     BallAndChain                     = new ProjectileObj("EnemyFlailKnightBall_Sprite");
     BallAndChain.IsWeighted          = false;
     BallAndChain.CollidesWithTerrain = false;
     BallAndChain.IgnoreBoundsCheck   = true;
     BallAndChain.OutlineWidth        = 2;
     BallAndChain2                    = (BallAndChain.Clone() as ProjectileObj);
     m_chain           = new SpriteObj("EnemyFlailKnightLink_Sprite");
     m_chainLinksList  = new List <Vector2>();
     m_chainLinks2List = new List <Vector2>();
     for (var i = 0; i < m_numChainLinks; i++)
     {
         m_chainLinksList.Add(default(Vector2));
     }
     for (var j = 0; j < m_numChainLinks / 2; j++)
     {
         m_chainLinks2List.Add(default(Vector2));
     }
     Type         = 1;
     TintablePart = _objectList[3];
     m_walkSound  = new FrameSoundObj(this, m_target, 1, "KnightWalk1", "KnightWalk2");
     m_walkSound2 = new FrameSoundObj(this, m_target, 6, "KnightWalk1", "KnightWalk2");
 }
コード例 #5
0
 public void ResetFireball()
 {
     if (m_fireballSummon != null)
     {
         m_levelScreen.ProjectileManager.DestroyProjectile(m_fireballSummon);
         m_fireballSummon = null;
     }
 }
コード例 #6
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_fireballSummon = null;
         base.Dispose();
     }
 }
コード例 #7
0
ファイル: EnemyObj_IceWizard.cs プロジェクト: Neojin9/RLRedux
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_iceballSummon = null;
         base.Dispose();
     }
 }
コード例 #8
0
        public void AddIcon(ProjectileObj projectile)
        {
            var projectileIconObj = m_resourcePool.CheckOut();

            projectileIconObj.Visible            = true;
            projectileIconObj.ForceDraw          = true;
            projectileIconObj.AttachedProjectile = projectile;
            projectile.AttachedIcon = projectileIconObj;
        }
コード例 #9
0
 public void Initialize()
 {
     for (var i = 0; i < m_poolSize; i++)
     {
         var projectileObj = new ProjectileObj("BoneProjectile_Sprite");
         projectileObj.Visible        = false;
         projectileObj.AnimationDelay = 0.05f;
         projectileObj.OutlineWidth   = 2;
         m_projectilePool.AddToPool(projectileObj);
     }
 }
コード例 #10
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_iconBG.Dispose();
         m_iconBG = null;
         m_iconProjectile.Dispose();
         m_iconProjectile   = null;
         AttachedProjectile = null;
         base.Dispose();
     }
 }
コード例 #11
0
ファイル: ProjectileIconObj.cs プロジェクト: Neojin9/RLRedux
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_iconBG.Dispose();
         this.m_iconBG = null;
         this.m_iconProjectile.Dispose();
         this.m_iconProjectile = null;
         this.AttachedProjectile = null;
         base.Dispose();
     }
 }
コード例 #12
0
        public void SummonFireball()
        {
            ResetFireball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardFireballProjectile_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = m_target,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                DestroysWithEnemy   = false,
                Scale               = ProjectileScale
            };

            if (Difficulty == GameTypes.EnemyDifficulty.EXPERT)
            {
                projectileData.SpriteName          = "GhostBossProjectile_Sprite";
                projectileData.CollidesWithTerrain = false;
            }
            SoundManager.Play3DSound(this, m_target, "Fire_Wizard_Form");
            m_fireballSummon                = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_fireballSummon.Opacity        = 0f;
            m_fireballSummon.Scale          = Vector2.Zero;
            m_fireballSummon.AnimationDelay = 0.1f;
            m_fireballSummon.PlayAnimation();
            m_fireballSummon.Rotation = 0f;
            object arg_186_0 = m_fireballSummon;
            var    arg_186_1 = 0.5f;
            Easing arg_186_2 = Back.EaseOut;
            var    array     = new string[6];

            array[0] = "Opacity";
            array[1] = "1";
            array[2] = "ScaleX";
            var arg_165_0 = array;
            var arg_165_1 = 3;
            var x         = ProjectileScale.X;

            arg_165_0[arg_165_1] = x.ToString();
            array[4]             = "ScaleY";
            var arg_184_0 = array;
            var arg_184_1 = 5;
            var y         = ProjectileScale.Y;

            arg_184_0[arg_184_1] = y.ToString();
            Tween.To(arg_186_0, arg_186_1, arg_186_2, array);
            projectileData.Dispose();
        }
コード例 #13
0
        public void DestroyIcon(ProjectileObj projectile)
        {
            var attachedIcon = projectile.AttachedIcon;

            attachedIcon.Visible      = false;
            attachedIcon.Rotation     = 0f;
            attachedIcon.TextureColor = Color.White;
            attachedIcon.Opacity      = 1f;
            attachedIcon.Flip         = SpriteEffects.None;
            attachedIcon.Scale        = new Vector2(1f, 1f);
            m_resourcePool.CheckIn(attachedIcon);
            attachedIcon.AttachedProjectile = null;
            projectile.AttachedIcon         = null;
        }
コード例 #14
0
 private void InitializeProjectiles()
 {
     m_earthSummonInSprite = new ProjectileObj("WizardEarthSpellCast_Sprite");
     m_earthSummonInSprite.AnimationDelay = 0.1f;
     m_earthSummonInSprite.PlayAnimation();
     m_earthSummonInSprite.Scale = Vector2.Zero;
     m_earthSummonOutSprite      = (m_earthSummonInSprite.Clone() as SpriteObj);
     m_earthSummonOutSprite.PlayAnimation();
     m_earthProjectileObj                     = new ProjectileObj("WizardEarthSpell_Sprite");
     m_earthProjectileObj.IsWeighted          = false;
     m_earthProjectileObj.CollidesWithTerrain = false;
     m_earthProjectileObj.DestroysWithEnemy   = false;
     m_earthProjectileObj.Damage              = Damage;
     m_earthProjectileObj.Scale               = ProjectileScale;
     m_earthProjectileObj.AnimationDelay      = 0.05f;
     m_earthProjectileObj.Rotation            = 0f;
     m_earthProjectileObj.CanBeFusRohDahed    = false;
 }
コード例 #15
0
 public void DestroyProjectile(ProjectileObj projectile)
 {
     if (m_projectilePool.ActiveObjsList.Contains(projectile))
     {
         projectile.CollidesWithTerrain     = true;
         projectile.DestroyOnRoomTransition = true;
         projectile.ChaseTarget             = false;
         projectile.Target       = null;
         projectile.Visible      = false;
         projectile.Scale        = new Vector2(1f, 1f);
         projectile.CurrentSpeed = 0f;
         projectile.Opacity      = 1f;
         projectile.IsAlive      = false;
         projectile.IsCollidable = true;
         m_levelScreen.PhysicsManager.RemoveObject(projectile);
         m_projectilePool.CheckIn(projectile);
     }
 }
コード例 #16
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_chain.Dispose();
         m_chain = null;
         BallAndChain.Dispose();
         BallAndChain = null;
         BallAndChain2.Dispose();
         BallAndChain2 = null;
         m_chainLinksList.Clear();
         m_chainLinksList = null;
         m_chainLinks2List.Clear();
         m_chainLinks2List = null;
         m_walkSound.Dispose();
         m_walkSound = null;
         m_walkSound2.Dispose();
         m_walkSound2 = null;
         base.Dispose();
     }
 }
コード例 #17
0
        public void SummonIceball()
        {
            ResetIceball();
            var projectileData = new ProjectileData(this)
            {
                SpriteName          = "WizardIceSpell_Sprite",
                SourceAnchor        = m_spellOffset,
                Target              = null,
                Speed               = new Vector2(0f, 0f),
                IsWeighted          = false,
                RotationSpeed       = 0f,
                Damage              = Damage,
                AngleOffset         = 0f,
                CollidesWithTerrain = false,
                Scale               = MiniBossIceSize
            };

            SoundManager.Play3DSound(this, m_target, "Ice_Wizard_Form");
            m_iceballSummon = m_levelScreen.ProjectileManager.FireProjectile(projectileData);
            m_iceballSummon.PlayAnimation("Start", "Grown");
            projectileData.Dispose();
        }
コード例 #18
0
 public void ChangeIceballState(ProjectileObj iceball)
 {
     iceball.CollidesWithTerrain = true;
 }
コード例 #19
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_chain.Dispose();
         this.m_chain = null;
         this.m_ballAndChain.Dispose();
         this.m_ballAndChain = null;
         this.m_ballAndChain2.Dispose();
         this.m_ballAndChain2 = null;
         this.m_chainLinksList.Clear();
         this.m_chainLinksList = null;
         this.m_chainLinks2List.Clear();
         this.m_chainLinks2List = null;
         this.m_walkSound.Dispose();
         this.m_walkSound = null;
         this.m_walkSound2.Dispose();
         this.m_walkSound2 = null;
         base.Dispose();
     }
 }
コード例 #20
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_fireballSummon = null;
         this.m_iceballSummon = null;
         if (this.m_earthSummonInSprite != null)
         {
             this.m_earthSummonInSprite.Dispose();
             this.m_earthSummonInSprite = null;
         }
         if (this.m_earthSummonOutSprite != null)
         {
             this.m_earthSummonOutSprite.Dispose();
             this.m_earthSummonOutSprite = null;
         }
         if (this.m_earthProjectileObj != null)
         {
             this.m_earthProjectileObj.Dispose();
             this.m_earthProjectileObj = null;
         }
         this.SpawnRoom = null;
         base.Dispose();
     }
 }
コード例 #21
0
ファイル: EnemyObj_LastBoss.cs プロジェクト: Neojin9/RLRedux
 public void ChangeProjectileSpeed(ProjectileObj proj, float speed, Vector2 heading)
 {
     proj.AccelerationX = heading.X * speed;
     proj.AccelerationY = -heading.Y * speed;
 }
コード例 #22
0
 public void ChangeFireballState(ProjectileObj fireball)
 {
     fireball.CollidesWithTerrain = true;
 }
コード例 #23
0
ファイル: ProjectileManager.cs プロジェクト: Neojin9/RLRedux
 public void Initialize()
 {
     for (int i = 0; i < this.m_poolSize; i++)
     {
         ProjectileObj projectileObj = new ProjectileObj("BoneProjectile_Sprite");
         projectileObj.Visible = false;
         projectileObj.AnimationDelay = 0.05f;
         projectileObj.OutlineWidth = 2;
         this.m_projectilePool.AddToPool(projectileObj);
     }
 }
コード例 #24
0
 public void SummonFireball()
 {
     this.ResetFireball();
     ProjectileData projectileData = new ProjectileData(this)
     {
         SpriteName = "WizardFireballProjectile_Sprite",
         SourceAnchor = this.m_spellOffset,
         Target = this.m_target,
         Speed = new Vector2(0f, 0f),
         IsWeighted = false,
         RotationSpeed = 0f,
         Damage = base.Damage,
         AngleOffset = 0f,
         CollidesWithTerrain = false,
         Scale = this.MiniBossFireballSize
     };
     if (base.Difficulty == GameTypes.EnemyDifficulty.EXPERT)
     {
         projectileData.SpriteName = "GhostBossProjectile_Sprite";
     }
     SoundManager.Play3DSound(this, this.m_target, "Fire_Wizard_Form");
     this.m_fireballSummon = this.m_levelScreen.ProjectileManager.FireProjectile(projectileData);
     this.m_fireballSummon.Opacity = 0f;
     this.m_fireballSummon.Scale = Vector2.Zero;
     this.m_fireballSummon.AnimationDelay = 0.1f;
     this.m_fireballSummon.PlayAnimation(true);
     this.m_fireballSummon.Rotation = 0f;
     Tween.To(this.m_fireballSummon, 0.5f, new Easing(Back.EaseOut), new string[]
     {
         "Opacity",
         "1",
         "ScaleX",
         this.MiniBossFireballSize.X.ToString(),
         "ScaleY",
         this.MiniBossFireballSize.Y.ToString()
     });
     projectileData.Dispose();
 }
コード例 #25
0
 public void ResetIceball()
 {
     if (this.m_iceballSummon != null)
     {
         this.m_levelScreen.ProjectileManager.DestroyProjectile(this.m_iceballSummon);
         this.m_iceballSummon = null;
     }
 }
コード例 #26
0
 public void ChangeFireballState(ProjectileObj fireball)
 {
     fireball.CollidesWithTerrain = true;
 }
コード例 #27
0
 public void SummonIceball()
 {
     this.ResetIceball();
     ProjectileData projectileData = new ProjectileData(this)
     {
         SpriteName = "WizardIceSpell_Sprite",
         SourceAnchor = this.m_spellOffset,
         Target = null,
         Speed = new Vector2(0f, 0f),
         IsWeighted = false,
         RotationSpeed = 0f,
         Damage = base.Damage,
         AngleOffset = 0f,
         CollidesWithTerrain = false,
         Scale = this.MiniBossIceSize
     };
     SoundManager.Play3DSound(this, this.m_target, "Ice_Wizard_Form");
     this.m_iceballSummon = this.m_levelScreen.ProjectileManager.FireProjectile(projectileData);
     this.m_iceballSummon.PlayAnimation("Start", "Grown", false);
     projectileData.Dispose();
 }
コード例 #28
0
 public void ChangeIceballState(ProjectileObj iceball)
 {
     iceball.CollidesWithTerrain = true;
 }
コード例 #29
0
ファイル: ProjectileManager.cs プロジェクト: Neojin9/RLRedux
 public void DestroyProjectile(ProjectileObj projectile)
 {
     if (this.m_projectilePool.ActiveObjsList.Contains(projectile))
     {
         projectile.CollidesWithTerrain = true;
         projectile.DestroyOnRoomTransition = true;
         projectile.ChaseTarget = false;
         projectile.Target = null;
         projectile.Visible = false;
         projectile.Scale = new Vector2(1f, 1f);
         projectile.CurrentSpeed = 0f;
         projectile.Opacity = 1f;
         projectile.IsAlive = false;
         projectile.IsCollidable = true;
         this.m_levelScreen.PhysicsManager.RemoveObject(projectile);
         this.m_projectilePool.CheckIn(projectile);
     }
 }
コード例 #30
0
 private void InitializeProjectiles()
 {
     this.m_earthSummonInSprite = new ProjectileObj("WizardEarthSpellCast_Sprite");
     this.m_earthSummonInSprite.AnimationDelay = 0.1f;
     this.m_earthSummonInSprite.PlayAnimation(true);
     this.m_earthSummonInSprite.Scale = Vector2.Zero;
     this.m_earthSummonOutSprite = (this.m_earthSummonInSprite.Clone() as SpriteObj);
     this.m_earthSummonOutSprite.PlayAnimation(true);
     this.m_earthProjectileObj = new ProjectileObj("WizardEarthSpell_Sprite");
     this.m_earthProjectileObj.IsWeighted = false;
     this.m_earthProjectileObj.CollidesWithTerrain = false;
     this.m_earthProjectileObj.DestroysWithEnemy = false;
     this.m_earthProjectileObj.Damage = base.Damage;
     this.m_earthProjectileObj.Scale = base.ProjectileScale;
     this.m_earthProjectileObj.AnimationDelay = 0.05f;
     this.m_earthProjectileObj.Rotation = 0f;
     this.m_earthProjectileObj.CanBeFusRohDahed = false;
 }