Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            Console.WriteLine(("Heyo!"));
            base.ViewDidLoad();
            main();
            // Perform any additional setup after loading the view, typically from a nib.
            TreasureFoundLabel.Hidden = true;
            OkLootButton.Hidden       = true;

            if (rc.Treasure)
            {
                //RYAN DO TREASURE HERE

                TreasureFoundLabel.Hidden = false;
                OkLootButton.Hidden       = false;
                ItemBase item = gen.GenerateItem(1);
                GameManager.Instance.playerCharacter.bag.Add(item);
            }

            if (!firstRoom)
            {
                if (!rc.Boss)
                {
                    Random rng    = new Random();
                    int    chance = rng.Next(0, 4);
                    if (chance == 0)
                    {
                        GameManager    gm     = GameManager.Instance;
                        EnemyCharacter enemy  = gm.GetRandomEnemy();
                        VC_BattleRoom  battle = new VC_BattleRoom(gm.playerCharacter, enemy);
                        PresentViewController(battle, true, null);
                    }
                }
                else
                {
                    GameManager    gm     = GameManager.Instance;
                    EnemyCharacter enemy  = gm.GetBossEnemy();
                    VC_BattleRoom  battle = new VC_BattleRoom(gm.playerCharacter, enemy);
                    PresentViewController(battle, true, null);
                }
            }

            if (LeftButtonDuty == Direction.None)
            {
                LeftButton.Hidden = true;
            }
            else
            {
                LeftButton.Hidden = false;
            }

            if (RightButtonDuty == Direction.None)
            {
                RightButton.Hidden = true;
            }
            else
            {
                RightButton.Hidden = false;
            }

            if (TopButtonDuty == Direction.None)
            {
                TopButton.Hidden = true;
            }
            else
            {
                TopButton.Hidden = false;
            }

            if (BottomButtonDuty == Direction.None)
            {
                BottomButton.Hidden = true;
            }
            else
            {
                BottomButton.Hidden = false;
            }
        }
Exemplo n.º 2
0
 public VC_BattleRoom(PlayerCharacter chr, EnemyCharacter enemy) : base("VC_BattleRoom", null)
 {
     Console.WriteLine("Battle Started");
     playerCharacter = chr;
     enemyCharacter  = enemy;
 }