예제 #1
0
 public override void Initialize()
 {
     m_speechBubble      = new SpriteObj("UpArrowSquare_Sprite");
     m_speechBubble.Flip = SpriteEffects.FlipHorizontally;
     m_icon       = new SpriteObj("Blank_Sprite");
     m_icon.Scale = new Vector2(2f, 2f);
     foreach (var current in GameObjList)
     {
         if (current.Name == "pedestal")
         {
             m_pedestal = (current as SpriteObj);
             break;
         }
     }
     m_pedestal.OutlineWidth = 2;
     m_icon.X            = m_pedestal.X;
     m_icon.Y            = m_pedestal.Y - (m_pedestal.Y - m_pedestal.Bounds.Top) - m_icon.Height / 2f - 10f;
     m_icon.OutlineWidth = 2;
     m_iconYPos          = m_icon.Y;
     GameObjList.Add(m_icon);
     m_speechBubble.Y       = m_icon.Y - 30f;
     m_speechBubble.X       = m_icon.X;
     m_speechBubble.Visible = false;
     GameObjList.Add(m_speechBubble);
     base.Initialize();
 }
예제 #2
0
    IEnumerator SpriteMovement(SpriteObj sprite, bool isAttack)
    {
        sprite.myGameObject.SetActive(true);

        while (sprite.endPos != sprite.myGameObject.transform.localPosition)
        {
            sprite.myGameObject.transform.localPosition = Vector3.MoveTowards(sprite.myGameObject.transform.localPosition, sprite.endPos, spriteAnimSpeed * Time.deltaTime);
            yield return(null);
        }

        sprite.myParentHero.RefreshText();
        if (!isAttack)
        {
            sprite.myParentHero.TextBuff();
        }
        if (sprite.myParentHero.CurrentHP <= 0)
        {
            sprite.myParentHero.Death();
        }


        sprite.myGameObject.transform.localPosition = sprite.startPos;
        sprite.myGameObject.SetActive(false);
        TurnComponent.Instance.CheckForNewTurn();
    }
예제 #3
0
        public Background(int numberStairs, int maxSize, bool withPlanets = true)
        {
            stairs = new Rectangle[numberStairs];

            for (int i = 0; i < numberStairs; i++)
            {
                int randomSize = (int)RandomGenerator.GetRandom(0, maxSize);

                stairs[i] = new Rectangle((int)RandomGenerator.GetRandom(0, Game.Win.width),
                                          (int)RandomGenerator.GetRandom(0, Game.Win.height),
                                          randomSize, randomSize);
            }

            if (withPlanets)
            {
                string planetFile = "Assets/planets/planet_0";
                planets = new SpriteObj[NUMBER_PLANET];

                //un solo pianeta perchè il frame rate rallentava troppo
                for (int i = 0; i < NUMBER_PLANET; i++)
                {
                    planets[i] = new SpriteObj(planetFile + RandomGenerator.GetRandom(1, 10) + ".png", Game.Win.width / 2, Game.Win.height / 4);
                    planets[i].Translate(-planets[i].Width / 2, -planets[i].Height / 2);
                }
            }

            color = new ColorRGB(255, 255, 255);
        }
예제 #4
0
 public RoomObj()
 {
     GameObjList                 = new List <GameObj>();
     TerrainObjList              = new List <TerrainObj>();
     DoorList                    = new List <DoorObj>();
     EnemyList                   = new List <EnemyObj>();
     BorderList                  = new List <BorderObj>();
     TempEnemyList               = new List <EnemyObj>();
     LevelType                   = GameTypes.LevelType.NONE;
     m_indexText                 = new TextObj(Game.PixelArtFontBold);
     m_indexText.FontSize        = 150f;
     m_indexText.Align           = Types.TextAlign.Centre;
     m_roomInfoText              = new TextObj(Game.PixelArtFontBold);
     m_roomInfoText.FontSize     = 30f;
     m_roomInfoText.Align        = Types.TextAlign.Centre;
     m_fairyChestText            = new TextObj(Game.JunicodeFont);
     m_fairyChestText.FontSize   = 26f;
     m_fairyChestText.Position   = new Vector2(300f, 20f);
     m_fairyChestText.DropShadow = new Vector2(2f, 2f);
     m_fairyChestText.Text       = "";
     m_pauseBG                   = new SpriteObj("Blank_Sprite");
     m_pauseBG.TextureColor      = Color.Black;
     m_pauseBG.Opacity           = 0f;
     IsReversed                  = false;
 }
예제 #5
0
        public override void LoadContent(GraphicsDevice graphics)
        {
            m_daggerIcons = new ObjContainer();
            var num  = 0;
            var num2 = 10;

            for (var i = 0; i < m_numTries; i++)
            {
                var spriteObj = new SpriteObj("SpellDagger_Sprite");
                spriteObj.Scale = new Vector2(2f, 2f);
                spriteObj.X     = num + 10;
                spriteObj.Y     = num2;
                num            += spriteObj.Width;
                if (i == m_numTries / 2 - 1)
                {
                    num   = 0;
                    num2 += 20;
                }
                m_daggerIcons.AddChild(spriteObj);
            }
            m_daggerIcons.OutlineWidth = 2;
            m_targetIcons = new ObjContainer();
            for (var j = 0; j < m_numTargets; j++)
            {
                var spriteObj2 = new SpriteObj("Target2Piece1_Sprite");
                spriteObj2.Scale = new Vector2(2f, 2f);
                spriteObj2.X    += j * (spriteObj2.Width + 10);
                m_targetIcons.AddChild(spriteObj2);
            }
            m_targetIcons.OutlineWidth = 2;
            GameObjList.Add(m_targetIcons);
            GameObjList.Add(m_daggerIcons);
            base.LoadContent(graphics);
        }
예제 #6
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         foreach (RaindropObj current in this.m_rainFG)
         {
             current.Dispose();
         }
         this.m_rainFG.Clear();
         this.m_rainFG = null;
         this.m_mountain1 = null;
         this.m_mountain2 = null;
         if (this.m_rainSFX != null)
         {
             this.m_rainSFX.Dispose();
         }
         this.m_rainSFX = null;
         this.m_tree1 = null;
         this.m_tree2 = null;
         this.m_tree3 = null;
         this.m_fern1 = null;
         this.m_fern2 = null;
         this.m_fern3 = null;
         this.m_introText.Dispose();
         this.m_introText = null;
         base.Dispose();
     }
 }
예제 #7
0
 public override void LoadContent()
 {
     m_loadingText              = new TextObj();
     m_loadingText.Font         = Game.JunicodeLargeFont;
     m_loadingText.Text         = "Building";
     m_loadingText.Align        = Types.TextAlign.Centre;
     m_loadingText.FontSize     = 40f;
     m_loadingText.OutlineWidth = 4;
     m_loadingText.ForceDraw    = true;
     m_gateSprite           = new ObjContainer("LoadingScreenGate_Character");
     m_gateSprite.ForceDraw = true;
     m_gateSprite.Scale     = new Vector2(2f, 2f);
     m_gateSprite.Y        -= m_gateSprite.Height;
     m_effectPool.Initialize();
     m_blackTransitionIn              = new SpriteObj("Blank_Sprite");
     m_blackTransitionIn.Rotation     = 15f;
     m_blackTransitionIn.Scale        = new Vector2(1320 / m_blackTransitionIn.Width, 2000 / m_blackTransitionIn.Height);
     m_blackTransitionIn.TextureColor = Color.Black;
     m_blackTransitionIn.ForceDraw    = true;
     m_blackScreen                     = new SpriteObj("Blank_Sprite");
     m_blackScreen.Scale               = new Vector2(1320 / m_blackScreen.Width, 720 / m_blackScreen.Height);
     m_blackScreen.TextureColor        = Color.Black;
     m_blackScreen.ForceDraw           = true;
     m_blackTransitionOut              = new SpriteObj("Blank_Sprite");
     m_blackTransitionOut.Rotation     = 15f;
     m_blackTransitionOut.Scale        = new Vector2(1320 / m_blackTransitionOut.Width, 2000 / m_blackTransitionOut.Height);
     m_blackTransitionOut.TextureColor = Color.Black;
     m_blackTransitionOut.ForceDraw    = true;
     base.LoadContent();
 }
예제 #8
0
 public override void Initialize()
 {
     foreach (var current in TerrainObjList)
     {
         if (current.Name == "BlacksmithBlock")
         {
             m_blacksmithBlock = current;
         }
         if (current.Name == "EnchantressBlock")
         {
             m_enchantressBlock = current;
         }
         if (current.Name == "ArchitectBlock")
         {
             m_architectBlock = current;
         }
         if (current.Name == "bridge")
         {
             current.ShowTerrain = false;
         }
     }
     for (var i = 0; i < GameObjList.Count; i++)
     {
         if (GameObjList[i].Name == "Mountains 1")
         {
             m_mountain1 = (GameObjList[i] as SpriteObj);
         }
         if (GameObjList[i].Name == "Mountains 2")
         {
             m_mountain2 = (GameObjList[i] as SpriteObj);
         }
     }
     base.Initialize();
 }
예제 #9
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_tutorialText.Dispose();
         m_tutorialText = null;
         m_waypointList.Clear();
         m_waypointList = null;
         m_creditsText.Dispose();
         m_creditsText = null;
         m_creditsTitleText.Dispose();
         m_creditsTitleText = null;
         Array.Clear(m_tutorialTextList, 0, m_tutorialTextList.Length);
         Array.Clear(m_tutorialControllerTextList, 0, m_tutorialControllerTextList.Length);
         Array.Clear(m_creditsTextTitleList, 0, m_creditsTextTitleList.Length);
         Array.Clear(m_creditsTextList, 0, m_creditsTextList.Length);
         m_tutorialTextList           = null;
         m_creditsTextTitleList       = null;
         m_creditsTextList            = null;
         m_tutorialControllerTextList = null;
         m_door         = null;
         m_doorSprite   = null;
         m_diary        = null;
         m_speechBubble = null;
         base.Dispose();
     }
 }
예제 #10
0
 public override void Initialize()
 {
     m_boss = (EnemyList[0] as EnemyObj_LastBoss);
     foreach (var current in GameObjList)
     {
         if (current.Name == "fountain")
         {
             m_fountain = (current as ObjContainer);
         }
         if (current.Name == "stainglass")
         {
             current.Opacity = 0.5f;
         }
         if (current.Name == "door")
         {
             m_bossDoorSprite = (current as SpriteObj);
         }
     }
     foreach (var current2 in DoorList)
     {
         if (current2.Name == "FinalBossDoor")
         {
             m_bossDoor        = current2;
             m_bossDoor.Locked = true;
             break;
         }
     }
     base.Initialize();
 }
예제 #11
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");
 }
예제 #12
0
 public WinnerPoint(int x, int y)
 {
     position = new Vector2(x, y);
     target   = new SpriteObj(TARGET_FILE, position);
     width    = target.Width;
     height   = target.Height;
 }
예제 #13
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         Console.WriteLine("Disposing Get Item Screen");
         this.m_continueText.Dispose();
         this.m_continueText = null;
         this.m_levelUpBGImage.Dispose();
         this.m_levelUpBGImage = null;
         SpriteObj[] levelUpParticles = this.m_levelUpParticles;
         for (int i = 0; i < levelUpParticles.Length; i++)
         {
             SpriteObj spriteObj = levelUpParticles[i];
             spriteObj.Dispose();
         }
         Array.Clear(this.m_levelUpParticles, 0, this.m_levelUpParticles.Length);
         this.m_levelUpParticles = null;
         this.m_buildUpSound = null;
         this.m_itemSprite.Dispose();
         this.m_itemSprite = null;
         this.m_itemFoundSprite.Dispose();
         this.m_itemFoundSprite = null;
         this.m_itemFoundText.Dispose();
         this.m_itemFoundText = null;
         this.m_tripStat1.Dispose();
         this.m_tripStat2.Dispose();
         this.m_tripStat1 = null;
         this.m_tripStat2 = null;
         this.m_tripStat1FoundText.Dispose();
         this.m_tripStat2FoundText.Dispose();
         this.m_tripStat1FoundText = null;
         this.m_tripStat2FoundText = null;
         base.Dispose();
     }
 }
예제 #14
0
 public override void Initialize()
 {
     m_bossTitle1               = new TextObj(Game.JunicodeFont);
     m_bossTitle1.Text          = "The Forsaken";
     m_bossTitle1.OutlineWidth  = 2;
     m_bossTitle1.FontSize      = 18f;
     m_bossTitle2               = new TextObj(Game.JunicodeLargeFont);
     m_bossTitle2.Text          = "Alexander";
     m_bossTitle2.OutlineWidth  = 2;
     m_bossTitle2.FontSize      = 40f;
     m_bossDivider              = new SpriteObj("Blank_Sprite");
     m_bossDivider.OutlineWidth = 2;
     foreach (var current in DoorList)
     {
         m_roomFloor = current.Bounds.Bottom;
     }
     m_bossChest          = new ChestObj(null);
     m_bossChest.Position = new Vector2(Bounds.Center.X - m_bossChest.Width / 2f, Bounds.Center.Y);
     GameObjList.Add(m_bossChest);
     m_rainFG = new List <RaindropObj>();
     for (var i = 0; i < 50; i++)
     {
         var raindropObj =
             new RaindropObj(new Vector2(CDGMath.RandomFloat(X - Width, X), CDGMath.RandomFloat(Y, Y + Height)));
         m_rainFG.Add(raindropObj);
         raindropObj.ChangeToParticle();
     }
     base.Initialize();
 }
예제 #15
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         foreach (var current in m_rainFG)
         {
             current.Dispose();
         }
         m_rainFG.Clear();
         m_rainFG    = null;
         m_mountain1 = null;
         m_mountain2 = null;
         if (m_rainSFX != null)
         {
             m_rainSFX.Dispose();
         }
         m_rainSFX = null;
         m_tree1   = null;
         m_tree2   = null;
         m_tree3   = null;
         m_fern1   = null;
         m_fern2   = null;
         m_fern3   = null;
         m_introText.Dispose();
         m_introText = null;
         base.Dispose();
     }
 }
예제 #16
0
 public override void LoadContent()
 {
     m_titleText           = new SpriteObj("GamePausedTitleText_Sprite");
     m_titleText.X         = 660f;
     m_titleText.Y         = 72f;
     m_titleText.ForceDraw = true;
     m_infoObjList         = new List <PauseInfoObj>();
     m_infoObjList.Add(new PauseInfoObj());
     m_profileCard = new SpriteObj("TitleProfileCard_Sprite");
     m_profileCard.OutlineWidth = 2;
     m_profileCard.Scale        = new Vector2(2f, 2f);
     m_profileCard.Position     = new Vector2(m_profileCard.Width, 720 - m_profileCard.Height);
     m_profileCard.ForceDraw    = true;
     m_optionsIcon              = new SpriteObj("TitleOptionsIcon_Sprite");
     m_optionsIcon.Scale        = new Vector2(2f, 2f);
     m_optionsIcon.OutlineWidth = m_profileCard.OutlineWidth;
     m_optionsIcon.Position     = new Vector2(1320 - m_optionsIcon.Width * 2 + 120, m_profileCard.Y);
     m_optionsIcon.ForceDraw    = true;
     m_profileCardKey           = new KeyIconTextObj(Game.JunicodeFont);
     m_profileCardKey.Align     = Types.TextAlign.Centre;
     m_profileCardKey.FontSize  = 12f;
     m_profileCardKey.Text      = "[Input:" + 7 + "]";
     m_profileCardKey.Position  = new Vector2(m_profileCard.X,
                                              m_profileCard.Bounds.Top - m_profileCardKey.Height - 10);
     m_profileCardKey.ForceDraw = true;
     m_optionsKey           = new KeyIconTextObj(Game.JunicodeFont);
     m_optionsKey.Align     = Types.TextAlign.Centre;
     m_optionsKey.FontSize  = 12f;
     m_optionsKey.Text      = "[Input:" + 4 + "]";
     m_optionsKey.Position  = new Vector2(m_optionsIcon.X, m_optionsIcon.Bounds.Top - m_optionsKey.Height - 10);
     m_optionsKey.ForceDraw = true;
     base.LoadContent();
 }
예제 #17
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         Console.WriteLine("Disposing Options Screen");
         foreach (var current in m_optionsArray)
         {
             current.Dispose();
         }
         m_optionsArray.Clear();
         m_optionsArray = null;
         m_bgSprite.Dispose();
         m_bgSprite            = null;
         m_optionsTitle        = null;
         m_changeControlsTitle = null;
         m_backToMenuObj       = null;
         m_confirmText.Dispose();
         m_confirmText = null;
         m_cancelText.Dispose();
         m_cancelText = null;
         m_navigationText.Dispose();
         m_navigationText = null;
         m_optionsBar.Dispose();
         m_optionsBar     = null;
         m_selectedOption = null;
         m_quickDropText.Dispose();
         m_quickDropText       = null;
         m_quickDropObj        = null;
         m_enableSteamCloudObj = null;
         m_reduceQualityObj    = null;
         base.Dispose();
     }
 }
예제 #18
0
 public override void LoadContent()
 {
     m_plate           = new ObjContainer("SkillUnlockPlate_Character");
     m_plate.Position  = new Vector2(660f, 360f);
     m_plate.ForceDraw = true;
     m_text            = new TextObj(Game.JunicodeFont);
     m_text.ForceDraw  = true;
     m_text.Text       =
         "This is temporary text to see how many sentences can be fit into this area.  Hopefully it is quite a bit, as this is the area where we will be comprehensively describing the unlock.  It will also be used to determine word wrap length.";
     m_text.FontSize = 10f;
     m_text.WordWrap(340);
     m_text.DropShadow = new Vector2(2f, 2f);
     m_plate.AddChild(m_text);
     m_text.Position          = new Vector2(-110f, -100f);
     m_picturePlate           = new ObjContainer("SkillUnlockPicturePlate_Character");
     m_picturePlate.Position  = new Vector2(360f, 410f);
     m_picturePlate.Rotation  = -15f;
     m_picturePlate.ForceDraw = true;
     m_picture              = new SpriteObj("BlacksmithUnlockPicture_Sprite");
     m_picture.ForceDraw    = true;
     m_picture.OutlineWidth = 1;
     m_picture.Position     = m_picturePlate.Position;
     m_titlePlate           = new SpriteObj("SkillUnlockTitlePlate_Sprite");
     m_titlePlate.Position  = new Vector2(660f, 160f);
     m_titlePlate.ForceDraw = true;
     m_title           = new SpriteObj("ClassUnlockedText_Sprite");
     m_title.Position  = m_titlePlate.Position;
     m_title.Y        -= 40f;
     m_title.ForceDraw = true;
     base.LoadContent();
 }
예제 #19
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"
     });
 }
예제 #20
0
파일: RoomObj.cs 프로젝트: Neojin9/RLRedux
 public RoomObj()
 {
     this.GameObjList = new List<GameObj>();
     this.TerrainObjList = new List<TerrainObj>();
     this.DoorList = new List<DoorObj>();
     this.EnemyList = new List<EnemyObj>();
     this.BorderList = new List<BorderObj>();
     this.TempEnemyList = new List<EnemyObj>();
     this.LevelType = GameTypes.LevelType.NONE;
     this.m_indexText = new TextObj(Game.PixelArtFontBold);
     this.m_indexText.FontSize = 150f;
     this.m_indexText.Align = Types.TextAlign.Centre;
     this.m_roomInfoText = new TextObj(Game.PixelArtFontBold);
     this.m_roomInfoText.FontSize = 30f;
     this.m_roomInfoText.Align = Types.TextAlign.Centre;
     this.m_fairyChestText = new TextObj(Game.JunicodeFont);
     this.m_fairyChestText.FontSize = 26f;
     this.m_fairyChestText.Position = new Vector2(300f, 20f);
     this.m_fairyChestText.DropShadow = new Vector2(2f, 2f);
     this.m_fairyChestText.Text = "";
     this.m_pauseBG = new SpriteObj("Blank_Sprite");
     this.m_pauseBG.TextureColor = Color.Black;
     this.m_pauseBG.Opacity = 0f;
     this.IsReversed = false;
 }
예제 #21
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_title.Dispose();
         m_title = null;
         m_slot1Container.Dispose();
         m_slot1Container = null;
         m_slot2Container.Dispose();
         m_slot2Container = null;
         m_slot3Container.Dispose();
         m_slot3Container = null;
         m_slotArray.Clear();
         m_slotArray    = null;
         m_selectedSlot = null;
         m_confirmText.Dispose();
         m_confirmText = null;
         m_cancelText.Dispose();
         m_cancelText = null;
         m_navigationText.Dispose();
         m_navigationText = null;
         m_deleteProfileText.Dispose();
         m_deleteProfileText = null;
         base.Dispose();
     }
 }
예제 #22
0
        public override void Initialize()
        {
            foreach (var current in EnemyList)
            {
                if (current is EnemyObj_Fireball)
                {
                    m_boss = (current as EnemyObj_Fireball);
                }
                current.Visible = false;
                current.PauseEnemy(true);
            }
            m_boss.ChangeSprite("EnemyGhostBossIdle_Character");
            m_bossStartingScale = m_boss.ScaleX;
            m_fireList          = new List <SpriteObj>();
            var num  = 0f;
            var num2 = 24f;

            for (var i = 0; i < 15; i++)
            {
                var spriteObj = new SpriteObj("GhostBossProjectile_Sprite");
                spriteObj.PlayAnimation();
                spriteObj.OutlineWidth = 2;
                spriteObj.Position     = CDGMath.GetCirclePosition(num, 300f, m_boss.Position);
                spriteObj.Scale        = new Vector2(2f, 2f);
                num += num2;
                spriteObj.Opacity = 0f;
                m_fireList.Add(spriteObj);
                GameObjList.Add(spriteObj);
            }
            base.Initialize();
        }
예제 #23
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         Console.WriteLine("Disposing Game Over Boss Screen");
         this.m_lastBoss = null;
         this.m_dialoguePlate.Dispose();
         this.m_dialoguePlate = null;
         this.m_continueText.Dispose();
         this.m_continueText = null;
         this.m_playerGhost.Dispose();
         this.m_playerGhost = null;
         this.m_spotlight.Dispose();
         this.m_spotlight = null;
         this.m_bossFallSound.Dispose();
         this.m_bossFallSound = null;
         this.m_bossKneesSound.Dispose();
         this.m_bossKneesSound = null;
         this.m_playerFrame.Dispose();
         this.m_playerFrame = null;
         this.m_king.Dispose();
         this.m_king = null;
         base.Dispose();
     }
 }
예제 #24
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_blacksmith.Dispose();
         m_blacksmith = null;
         m_blacksmithIcon.Dispose();
         m_blacksmithIcon = null;
         m_blacksmithNewIcon.Dispose();
         m_blacksmithNewIcon = null;
         m_blacksmithBoard.Dispose();
         m_blacksmithBoard = null;
         m_enchantress.Dispose();
         m_enchantress = null;
         m_enchantressIcon.Dispose();
         m_enchantressIcon = null;
         m_enchantressNewIcon.Dispose();
         m_enchantressNewIcon = null;
         m_tent.Dispose();
         m_tent = null;
         m_architect.Dispose();
         m_architect = null;
         m_architectIcon.Dispose();
         m_architectIcon = null;
         m_screw.Dispose();
         m_screw = null;
         if (m_blacksmithAnvilSound != null)
         {
             m_blacksmithAnvilSound.Dispose();
         }
         m_blacksmithAnvilSound = null;
         m_tree1 = null;
         m_tree2 = null;
         m_tree3 = null;
         m_fern1 = null;
         m_fern2 = null;
         m_fern3 = null;
         foreach (var current in m_rainFG)
         {
             current.Dispose();
         }
         m_rainFG.Clear();
         m_rainFG    = null;
         m_mountain1 = null;
         m_mountain2 = null;
         m_tollCollector.Dispose();
         m_tollCollector = null;
         m_tollCollectorIcon.Dispose();
         m_tollCollectorIcon = null;
         m_blacksmithBlock   = null;
         m_enchantressBlock  = null;
         m_architectBlock    = null;
         if (m_rainSFX != null)
         {
             m_rainSFX.Dispose();
         }
         m_rainSFX = null;
         base.Dispose();
     }
 }
예제 #25
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         Console.WriteLine("Disposing Game Over Boss Screen");
         m_lastBoss = null;
         m_dialoguePlate.Dispose();
         m_dialoguePlate = null;
         m_continueText.Dispose();
         m_continueText = null;
         m_playerGhost.Dispose();
         m_playerGhost = null;
         m_spotlight.Dispose();
         m_spotlight = null;
         m_bossFallSound.Dispose();
         m_bossFallSound = null;
         m_bossKneesSound.Dispose();
         m_bossKneesSound = null;
         m_playerFrame.Dispose();
         m_playerFrame = null;
         m_king.Dispose();
         m_king = null;
         base.Dispose();
     }
 }
예제 #26
0
 public BlacksmithObj()
     : base("Blacksmith_Character")
 {
     this.m_hammerSprite = (this._objectList[5] as SpriteObj);
     this.m_headSprite = (this._objectList[3] as SpriteObj);
     base.AnimationDelay = 0.1f;
 }
예제 #27
0
 public override void Initialize()
 {
     this.m_speechBubble = new SpriteObj("UpArrowSquare_Sprite");
     this.m_speechBubble.Flip = SpriteEffects.FlipHorizontally;
     this.m_icon = new SpriteObj("Blank_Sprite");
     foreach (GameObj current in base.GameObjList)
     {
         if (current.Name == "pedestal")
         {
             this.m_pedestal = (current as SpriteObj);
             break;
         }
     }
     this.m_pedestal.OutlineWidth = 2;
     this.m_icon.X = this.m_pedestal.X;
     this.m_icon.Y = this.m_pedestal.Y - (this.m_pedestal.Y - (float)this.m_pedestal.Bounds.Top) - (float)this.m_icon.Height / 2f - 20f;
     this.m_icon.OutlineWidth = 2;
     this.m_iconYPos = this.m_icon.Y;
     base.GameObjList.Add(this.m_icon);
     this.m_speechBubble.Y = this.m_icon.Y - 30f;
     this.m_speechBubble.X = this.m_icon.X;
     this.m_speechBubble.Visible = false;
     base.GameObjList.Add(this.m_speechBubble);
     base.Initialize();
 }
예제 #28
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         Console.WriteLine("Disposing Get Item Screen");
         m_continueText.Dispose();
         m_continueText = null;
         m_levelUpBGImage.Dispose();
         m_levelUpBGImage = null;
         var levelUpParticles = m_levelUpParticles;
         for (var i = 0; i < levelUpParticles.Length; i++)
         {
             var spriteObj = levelUpParticles[i];
             spriteObj.Dispose();
         }
         Array.Clear(m_levelUpParticles, 0, m_levelUpParticles.Length);
         m_levelUpParticles = null;
         m_buildUpSound     = null;
         m_itemSprite.Dispose();
         m_itemSprite = null;
         m_itemFoundSprite.Dispose();
         m_itemFoundSprite = null;
         m_itemFoundText.Dispose();
         m_itemFoundText = null;
         m_tripStat1.Dispose();
         m_tripStat2.Dispose();
         m_tripStat1 = null;
         m_tripStat2 = null;
         m_tripStat1FoundText.Dispose();
         m_tripStat2FoundText.Dispose();
         m_tripStat1FoundText = null;
         m_tripStat2FoundText = null;
         base.Dispose();
     }
 }
예제 #29
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         Console.WriteLine("Disposing Options Screen");
         foreach (OptionsObj current in this.m_optionsArray)
         {
             current.Dispose();
         }
         this.m_optionsArray.Clear();
         this.m_optionsArray = null;
         this.m_bgSprite.Dispose();
         this.m_bgSprite = null;
         this.m_optionsTitle = null;
         this.m_changeControlsTitle = null;
         this.m_backToMenuObj = null;
         this.m_confirmText.Dispose();
         this.m_confirmText = null;
         this.m_cancelText.Dispose();
         this.m_cancelText = null;
         this.m_navigationText.Dispose();
         this.m_navigationText = null;
         this.m_optionsBar.Dispose();
         this.m_optionsBar = null;
         this.m_selectedOption = null;
         this.m_quickDropText.Dispose();
         this.m_quickDropText = null;
         this.m_quickDropObj = null;
         this.m_enableSteamCloudObj = null;
         this.m_reduceQualityObj = null;
         base.Dispose();
     }
 }
예제 #30
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();
     }
 }
예제 #31
0
        public override void LoadContent()
        {
            var textObj = new TextObj(Game.JunicodeFont);

            textObj.FontSize = 12f;
            textObj.Align    = Types.TextAlign.Left;
            var textObj2 = new TextObj(Game.JunicodeFont);

            textObj2.FontSize          = 14f;
            textObj2.Text              = "Blacksmith";
            textObj2.DropShadow        = new Vector2(2f, 2f);
            textObj2.TextureColor      = new Color(236, 197, 132);
            m_dialogContainer          = new ObjContainer("DialogBox_Character");
            m_dialogContainer.Position = new Vector2(660f, 100f);
            m_dialogContainer.AddChild(textObj2);
            m_dialogContainer.ForceDraw = true;
            textObj2.Position           = new Vector2(-(float)m_dialogContainer.Width / 2.2f,
                                                      -(float)m_dialogContainer.Height / 1.6f);
            m_dialogContainer.AddChild(textObj);
            textObj.Position = new Vector2(-(float)m_dialogContainer.Width / 2.15f,
                                           -(float)m_dialogContainer.Height / 3.5f);
            textObj.Text =
                "This is a test to see how much text I can fit onto this dialog box without it running out of space. The text needs to be defined after the dialog text position is set, because the dialogtext width affects the entire width of the dialog container, which in END.";
            textObj.WordWrap(850);
            textObj.DropShadow = new Vector2(2f, 3f);
            var spriteObj = new SpriteObj("ContinueTextIcon_Sprite");

            spriteObj.Position = new Vector2(m_dialogContainer.GetChildAt(2).Bounds.Right,
                                             m_dialogContainer.GetChildAt(2).Bounds.Bottom);
            m_dialogContainer.AddChild(spriteObj);
            m_dialogContinueIconY = spriteObj.Y;
            var textObj3 = new TextObj(Game.JunicodeFont);

            textObj3.FontSize = 12f;
            textObj3.Text     = "Yes";
            textObj3.Align    = Types.TextAlign.Centre;
            var textObj4 = new TextObj(Game.JunicodeFont);

            textObj4.FontSize       = 12f;
            textObj4.Text           = "No";
            textObj4.Align          = Types.TextAlign.Centre;
            m_dialogChoiceContainer = new ObjContainer();
            var obj = new SpriteObj("GameOverStatPlate_Sprite");

            m_dialogChoiceContainer.AddChild(obj);
            var spriteObj2 = new SpriteObj("DialogueChoiceHighlight_Sprite");

            m_dialogChoiceContainer.AddChild(spriteObj2);
            m_dialogChoiceContainer.ForceDraw = true;
            m_dialogChoiceContainer.Position  = new Vector2(660f, 360f);
            m_dialogChoiceContainer.AddChild(textObj3);
            textObj3.Y -= 40f;
            m_dialogChoiceContainer.AddChild(textObj4);
            textObj4.Y                     += 7f;
            spriteObj2.Position             = new Vector2(textObj3.X, textObj3.Y + spriteObj2.Height / 2 + 3f);
            m_dialogChoiceContainer.Scale   = Vector2.Zero;
            m_dialogChoiceContainer.Visible = false;
            base.LoadContent();
        }
예제 #32
0
 public ProjectileIconObj()
 {
     ForceDraw                  = true;
     m_iconBG                   = new SpriteObj("ProjectileIcon_Sprite");
     m_iconBG.ForceDraw         = true;
     m_iconProjectile           = new SpriteObj("Blank_Sprite");
     m_iconProjectile.ForceDraw = true;
 }
예제 #33
0
 public BorderObj()
 {
     TextureScale         = new Vector2(1f, 1f);
     CornerTexture        = new SpriteObj("Blank_Sprite");
     CornerTexture.Scale  = new Vector2(2f, 2f);
     CornerLTexture       = new SpriteObj("Blank_Sprite");
     CornerLTexture.Scale = new Vector2(2f, 2f);
 }
예제 #34
0
 public ProjectileIconObj()
 {
     base.ForceDraw = true;
     this.m_iconBG = new SpriteObj("ProjectileIcon_Sprite");
     this.m_iconBG.ForceDraw = true;
     this.m_iconProjectile = new SpriteObj("Blank_Sprite");
     this.m_iconProjectile.ForceDraw = true;
 }
예제 #35
0
파일: Ship.cs 프로젝트: ngaeta/Lunar-Land
 private void CreateSprites()
 {
     spriteUp         = new SpriteObj(SHIP_UP_FILE, position);
     spriteUp_Left    = new SpriteObj(SHIP_UP_LEFT_FILE, position);
     spriteUp_Right   = new SpriteObj(SHIP_UP_RIGHT_FILE, position);
     spriteDown       = new SpriteObj(SHIP_DOWN_FILE, position);
     spriteDown_Left  = new SpriteObj(SHIP_DOWN_LEFT_FILE, position);
     spriteDown_Right = new SpriteObj(SHIP_DOWN_RIGHT_FILE, position);
 }
예제 #36
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_arrowIcon.Dispose();
         this.m_arrowIcon = null;
         base.Dispose();
     }
 }
예제 #37
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_fountain = null;
         this.m_speechBubble = null;
         base.Dispose();
     }
 }
예제 #38
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_player = null;
         m_level  = null;
         if (m_alphaMaskRT != null && !m_alphaMaskRT.IsDisposed)
         {
             m_alphaMaskRT.Dispose();
         }
         m_alphaMaskRT = null;
         if (m_mapScreenRT != null && !m_mapScreenRT.IsDisposed)
         {
             m_mapScreenRT.Dispose();
         }
         m_mapScreenRT = null;
         foreach (var current in m_roomSpriteList)
         {
             current.Dispose();
         }
         m_roomSpriteList.Clear();
         m_roomSpriteList = null;
         foreach (var current2 in m_doorSpriteList)
         {
             current2.Dispose();
         }
         m_doorSpriteList.Clear();
         m_doorSpriteList = null;
         foreach (var current3 in m_iconSpriteList)
         {
             current3.Dispose();
         }
         m_iconSpriteList.Clear();
         m_iconSpriteList = null;
         AddedRoomsList.Clear();
         AddedRoomsList = null;
         m_roomSpritePosList.Clear();
         m_roomSpritePosList = null;
         m_doorSpritePosList.Clear();
         m_doorSpritePosList = null;
         m_iconSpritePosList.Clear();
         m_iconSpritePosList = null;
         m_playerSprite.Dispose();
         m_playerSprite = null;
         foreach (var current4 in m_teleporterList)
         {
             current4.Dispose();
         }
         m_teleporterList.Clear();
         m_teleporterList = null;
         m_teleporterPosList.Clear();
         m_teleporterPosList = null;
         m_xOffsetTween      = null;
         m_yOffsetTween      = null;
         base.Dispose();
     }
 }
예제 #39
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_deadZoneBar = null;
         this.m_deadZoneBarBG = null;
         base.Dispose();
     }
 }
예제 #40
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_volumeBar   = null;
         m_volumeBarBG = null;
         base.Dispose();
     }
 }
예제 #41
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_deadZoneBar   = null;
         m_deadZoneBarBG = null;
         base.Dispose();
     }
 }
예제 #42
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_hammerSprite = null;
         this.m_headSprite = null;
         base.Dispose();
     }
 }
예제 #43
0
 public override void Dispose()
 {
     if (!IsDisposed)
     {
         m_fountain     = null;
         m_speechBubble = null;
         base.Dispose();
     }
 }
예제 #44
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_pedestal = null;
         this.m_icon = null;
         this.m_speechBubble = null;
         base.Dispose();
     }
 }
예제 #45
0
파일: NpcObj.cs 프로젝트: Neojin9/RLRedux
 public NpcObj(string spriteName)
     : base(spriteName)
 {
     this.CanTalk = true;
     this.m_talkIcon = new SpriteObj("ExclamationBubble_Sprite");
     this.m_talkIcon.Scale = new Vector2(2f, 2f);
     this.m_talkIcon.Visible = false;
     this.m_talkIcon.OutlineWidth = 2;
     base.OutlineWidth = 2;
 }
예제 #46
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_playerShrug.Dispose();
         this.m_playerShrug = null;
         this.m_text.Dispose();
         this.m_text = null;
         base.Dispose();
     }
 }
예제 #47
0
 public KeyIconObj()
 {
     SpriteObj obj = new SpriteObj("KeyboardButton_Sprite");
     this.AddChild(obj);
     this.m_buttonText = new TextObj(Game.PixelArtFont);
     this.m_buttonText.FontSize = 16f;
     this.m_buttonText.DropShadow = new Vector2(1f, 1f);
     this.m_buttonText.Align = Types.TextAlign.Centre;
     this.m_buttonText.Y = (float)(-(float)(this.m_buttonText.Height / 2));
     this.AddChild(this.m_buttonText);
     this.m_buttonText.Visible = false;
 }
예제 #48
0
 public TeleporterObj()
     : base("TeleporterBase_Sprite", null)
 {
     base.CollisionTypeTag = 1;
     this.SetCollision(false);
     base.IsWeighted = false;
     this.Activated = false;
     base.OutlineWidth = 2;
     this.m_arrowIcon = new SpriteObj("UpArrowSquare_Sprite");
     this.m_arrowIcon.OutlineWidth = 2;
     this.m_arrowIcon.Visible = false;
 }
예제 #49
0
 public EnemyObj_Eyeball(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyEyeballIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     this.m_pupil = new SpriteObj("EnemyEyeballPupil_Sprite");
     this.AddChild(this.m_pupil);
     this.m_squishSound = new FrameSoundObj(this, this.m_target, 2, new string[]
     {
         "Eyeball_Prefire"
     });
     this.Type = 6;
     base.DisableCollisionBoxRotations = false;
 }
예제 #50
0
 public EnemyObj_Ninja(PlayerObj target, PhysicsManager physicsManager, ProceduralLevelScreen levelToAttachTo, GameTypes.EnemyDifficulty difficulty)
     : base("EnemyNinjaIdle_Character", target, physicsManager, levelToAttachTo, difficulty)
 {
     this.Type = 13;
     this.m_smoke = new SpriteObj("NinjaSmoke_Sprite");
     this.m_smoke.AnimationDelay = 0.05f;
     this.m_log = new SpriteObj("Log_Sprite");
     this.m_smoke.Visible = false;
     this.m_smoke.Scale = new Vector2(5f, 5f);
     this.m_log.Visible = false;
     this.m_log.OutlineWidth = 2;
 }
예제 #51
0
 public FairyChestObj(PhysicsManager physicsManager)
     : base(physicsManager)
 {
     this.m_lockSprite = new SpriteObj("Chest4Unlock_Sprite");
     this.m_errorSprite = new SpriteObj("CancelIcon_Sprite");
     this.m_errorSprite.Visible = false;
     this.m_timerText = new TextObj(Game.JunicodeFont);
     this.m_timerText.FontSize = 18f;
     this.m_timerText.DropShadow = new Vector2(2f, 2f);
     this.m_timerText.Align = Types.TextAlign.Centre;
     this.m_player = Game.ScreenManager.Player;
 }
예제 #52
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         Console.WriteLine("Disposing CDG Splash Screen");
         this.m_logo.Dispose();
         this.m_logo = null;
         this.m_loadingText.Dispose();
         this.m_loadingText = null;
         base.Dispose();
     }
 }
예제 #53
0
 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();
     }
 }
예제 #54
0
 public DeadZoneOptionsObj(OptionsScreen parentScreen)
     : base(parentScreen, "Joystick Dead Zone")
 {
     this.m_deadZoneBarBG = new SpriteObj("OptionsScreenVolumeBG_Sprite");
     this.m_deadZoneBarBG.X = (float)this.m_optionsTextOffset;
     this.m_deadZoneBarBG.Y = (float)this.m_deadZoneBarBG.Height / 2f - 2f;
     this.AddChild(this.m_deadZoneBarBG);
     this.m_deadZoneBar = new SpriteObj("OptionsScreenVolumeBar_Sprite");
     this.m_deadZoneBar.X = this.m_deadZoneBarBG.X + 6f;
     this.m_deadZoneBar.Y = this.m_deadZoneBarBG.Y + 5f;
     this.AddChild(this.m_deadZoneBar);
 }
예제 #55
0
파일: ChestObj.cs 프로젝트: Neojin9/RLRedux
 public ChestObj(PhysicsManager physicsManager)
     : base("Chest1_Sprite", physicsManager)
 {
     base.DisableHitboxUpdating = true;
     base.IsWeighted = false;
     base.Layer = 1f;
     base.OutlineWidth = 2;
     this.IsProcedural = true;
     this.m_arrowIcon = new SpriteObj("UpArrowSquare_Sprite");
     this.m_arrowIcon.OutlineWidth = 2;
     this.m_arrowIcon.Visible = false;
 }
예제 #56
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_enemyNameText.Dispose();
         this.m_enemyNameText = null;
         this.m_enemyLevelText.Dispose();
         this.m_enemyLevelText = null;
         this.m_enemyHPBar.Dispose();
         this.m_enemyHPBar = null;
         base.Dispose();
     }
 }
예제 #57
0
 public override void LoadContent()
 {
     this.m_text = new TextObj(Game.JunicodeLargeFont);
     this.m_text.FontSize = 20f;
     this.m_text.Text = "Thanks for playing the Rogue Legacy Demo. You're pretty good at games.";
     this.m_text.ForceDraw = true;
     this.m_text.Position = new Vector2(660f - (float)this.m_text.Width / 2f, 360f - (float)this.m_text.Height / 2f - 30f);
     this.m_playerShrug = new SpriteObj("PlayerShrug_Sprite");
     this.m_playerShrug.ForceDraw = true;
     this.m_playerShrug.Position = new Vector2(660f, (float)(this.m_text.Bounds.Bottom + 100));
     this.m_playerShrug.Scale = new Vector2(3f, 3f);
     base.LoadContent();
 }
예제 #58
0
 public EnemyHUDObj()
     : base("EnemyHUD_Sprite")
 {
     base.ForceDraw = true;
     this.m_enemyNameText = new TextObj(null);
     this.m_enemyNameText.Font = Game.JunicodeFont;
     this.m_enemyNameText.FontSize = 10f;
     this.m_enemyNameText.Align = Types.TextAlign.Right;
     this.m_enemyLevelText = new TextObj(null);
     this.m_enemyLevelText.Font = Game.EnemyLevelFont;
     this.m_enemyHPBar = new SpriteObj("EnemyHPBar_Sprite");
     this.m_enemyHPBar.ForceDraw = true;
     this.m_enemyHPBarLength = this.m_enemyHPBar.SpriteRect.Width;
 }
예제 #59
0
 public override void Dispose()
 {
     if (!base.IsDisposed)
     {
         this.m_player = null;
         this.m_lockSprite.Dispose();
         this.m_lockSprite = null;
         this.m_errorSprite.Dispose();
         this.m_errorSprite = null;
         this.m_timerText.Dispose();
         this.m_timerText = null;
         base.Dispose();
     }
 }
예제 #60
0
파일: SkillObj.cs 프로젝트: Neojin9/RLRedux
 public SkillObj(string spriteName)
     : base(spriteName)
 {
     this.StatType = 0;
     this.DisplayStat = false;
     base.Visible = false;
     base.ForceDraw = true;
     this.LevelText = new TextObj(Game.JunicodeFont);
     this.LevelText.FontSize = 10f;
     this.LevelText.Align = Types.TextAlign.Centre;
     this.LevelText.OutlineWidth = 2;
     this.InputDescription = "";
     base.OutlineWidth = 2;
     this.m_coinIcon = new SpriteObj("UpgradeIcon_Sprite");
 }