public uint CreateSkillAoE(SkillType skill, Position position, int rankP)
        {
            SkillAoE    skillAoE;
            Sprite      sprite;
            Collideable collideable;
            uint        eid = Entity.NextEntity();

            position.EntityID = eid;

            switch (skill)
            {
            case SkillType.Detnate:
                skillAoE = new SkillAoE()
                {
                    EntityID = eid,
                    radius   = 1,
                    rank     = rankP,
                };
                sprite = new Sprite()
                {
                    EntityID     = eid,
                    SpriteSheet  = game.Content.Load <Texture2D>("Spritesheets/BlueBullet"),
                    SpriteBounds = new Rectangle(0, 0, 10, 10),
                };
                position.Radius = 5;
                break;

            default:
                throw new Exception("Not a AoE skill");
            }

            collideable = new Collideable()
            {
                EntityID = eid,
                RoomID   = position.RoomID,
                Bounds   = new CircleBounds(position.Center, position.Radius),
            };

            game.SkillAoEComponent.Add(eid, skillAoE);
            game.PositionComponent.Add(eid, position);
            game.SpriteComponent.Add(eid, sprite);
            game.CollisionComponent.Add(eid, collideable);
            return(eid);
        }
        public uint CreateSkillAoE(SkillType skill, Position position, int rankP)
        {
            SkillAoE skillAoE;
            Sprite sprite;
            Collideable collideable;
            uint eid = Entity.NextEntity();

            position.EntityID = eid;

            switch (skill)
            {
                case SkillType.Detnate:
                    skillAoE = new SkillAoE()
                    {
                        EntityID = eid,
                        radius = 1,
                        rank = rankP,
                    };
                    sprite = new Sprite()
                    {
                        EntityID = eid,
                        SpriteSheet = game.Content.Load<Texture2D>("Spritesheets/BlueBullet"),
                        SpriteBounds = new Rectangle(0, 0, 10, 10),
                    };
                    position.Radius = 5;
                    break;
                default:
                    throw new Exception("Not a AoE skill");
            }

            collideable = new Collideable()
            {
                EntityID = eid,
                RoomID = position.RoomID,
                Bounds = new CircleBounds(position.Center, position.Radius),
            };

            game.SkillAoEComponent.Add(eid, skillAoE);
            game.PositionComponent.Add(eid, position);
            game.SpriteComponent.Add(eid, sprite);
            game.CollisionComponent.Add(eid, collideable);
            return eid;
        }
Exemplo n.º 3
0
        public uint CreateSkillAoE(SkillType skill, Position position, int rankP, int radius)
        {
            SkillAoE skillAoE;
            Sprite sprite;
            Collideable collideable;
            uint eid = Entity.NextEntity();

            position.EntityID = eid;

            switch (skill)
            {
                #region Gargranian AOE Skills

                #region Detonate
                case SkillType.ImprovedPsionicSpear:
                    {
                        skillAoE = new SkillAoE()
                        {
                            EntityID = eid,
                            radius = 1,
                            rank = rankP,
                        };
                        sprite = new Sprite()
                        {
                            EntityID = eid,
                            SpriteSheet = game.Content.Load<Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                            SpriteBounds = new Rectangle(0, 0, 10, 10),
                        };
                        position.Radius = radius;
                        break;
                    }
                #endregion

                #endregion

                #region Cultist AOE Skills

                #region Fear
                case SkillType.Fear:
                    {
                        skillAoE = new SkillAoE()
                        {
                            EntityID = eid,
                            radius = 1,
                            rank = rankP,
                        };
                        sprite = new Sprite()
                        {
                            EntityID = eid,
                            SpriteSheet = game.Content.Load<Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                            SpriteBounds = new Rectangle(0, 0, 10, 10),
                        };
                        position.Radius = radius;
                        break;
                    }
                #endregion

                #region Push
                case SkillType.Push:
                    {
                        skillAoE = new SkillAoE()
                        {
                            EntityID = eid,
                            radius = 1,
                            rank = rankP,
                        };
                        sprite = new Sprite()
                        {
                            EntityID = eid,
                            SpriteSheet = game.Content.Load<Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                            SpriteBounds = new Rectangle(0, 0, 10, 10),
                        };
                        position.Radius = radius;
                        break;
                    }
                #endregion

                #region Malice
                case SkillType.Malice:
                    {
                        skillAoE = new SkillAoE()
                        {
                            EntityID = eid,
                            radius = 1,
                            rank = rankP,
                        };
                        sprite = new Sprite()
                        {
                            EntityID = eid,
                            SpriteSheet = game.Content.Load<Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                            SpriteBounds = new Rectangle(0, 0, 10, 10),
                        };
                        position.Radius = radius;
                        break;
                    }
                #endregion

                #endregion

                default:
                    throw new Exception("Not a AoE skill");
            }

            collideable = new Collideable()
            {
                EntityID = eid,
                RoomID = position.RoomID,
                Bounds = new CircleBounds(position.Center, position.Radius),
            };

            game.SkillAoEComponent.Add(eid, skillAoE);
            game.PositionComponent.Add(eid, position);
            game.SpriteComponent.Add(eid, sprite);
            game.CollisionComponent.Add(eid, collideable);
            return eid;
        }
        public uint CreateSkillAoE(SkillType skill, Position position, int rankP, int radius)
        {
            SkillAoE    skillAoE;
            Sprite      sprite;
            Collideable collideable;
            uint        eid = Entity.NextEntity();

            position.EntityID = eid;

            switch (skill)
            {
                #region Gargranian AOE Skills

                #region Detonate
            case SkillType.ImprovedPsionicSpear:
            {
                skillAoE = new SkillAoE()
                {
                    EntityID = eid,
                    radius   = 1,
                    rank     = rankP,
                };
                sprite = new Sprite()
                {
                    EntityID     = eid,
                    SpriteSheet  = game.Content.Load <Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                    SpriteBounds = new Rectangle(0, 0, 10, 10),
                };
                position.Radius = radius;
                break;
            }
                #endregion

                #endregion

                #region Cultist AOE Skills

                #region Fear
            case SkillType.Fear:
            {
                skillAoE = new SkillAoE()
                {
                    EntityID = eid,
                    radius   = 1,
                    rank     = rankP,
                };
                sprite = new Sprite()
                {
                    EntityID     = eid,
                    SpriteSheet  = game.Content.Load <Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                    SpriteBounds = new Rectangle(0, 0, 10, 10),
                };
                position.Radius = radius;
                break;
            }
                #endregion

                #region Push
            case SkillType.Push:
            {
                skillAoE = new SkillAoE()
                {
                    EntityID = eid,
                    radius   = 1,
                    rank     = rankP,
                };
                sprite = new Sprite()
                {
                    EntityID     = eid,
                    SpriteSheet  = game.Content.Load <Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                    SpriteBounds = new Rectangle(0, 0, 10, 10),
                };
                position.Radius = radius;
                break;
            }
                #endregion

                #region Malice
            case SkillType.Malice:
            {
                skillAoE = new SkillAoE()
                {
                    EntityID = eid,
                    radius   = 1,
                    rank     = rankP,
                };
                sprite = new Sprite()
                {
                    EntityID     = eid,
                    SpriteSheet  = game.Content.Load <Texture2D>("Spritesheets/Weapons/Bullets/BlueBullet"),
                    SpriteBounds = new Rectangle(0, 0, 10, 10),
                };
                position.Radius = radius;
                break;
            }
                #endregion

                #endregion

            default:
                throw new Exception("Not a AoE skill");
            }

            collideable = new Collideable()
            {
                EntityID = eid,
                RoomID   = position.RoomID,
                Bounds   = new CircleBounds(position.Center, position.Radius),
            };

            game.SkillAoEComponent.Add(eid, skillAoE);
            game.PositionComponent.Add(eid, position);
            game.SpriteComponent.Add(eid, sprite);
            game.CollisionComponent.Add(eid, collideable);
            return(eid);
        }