Exemple #1
0
    private void Awake()
    {
        if (_instance != null && _instance != this)
        {
            Destroy(this.gameObject);
        }
        else
        {
            _instance = this;

            canvasTransform = GameObject.FindGameObjectWithTag("Canvas").transform;
            boardTransform  = GameObject.FindGameObjectWithTag("Board").transform;
            mainPlayer      = new PlayableCharacter(80, "Carlos", new Energy(3), CharacterModelLibrary.KnightCharacterModel());


            // mainPlayer.AddCardToDeckById(5);
            mainPlayer.OnCharacterDead += CheckCombatEndCondition;
            mainPlayer.AddCardToDeck(CardLibrary.Charge());
            mainPlayer.AddCardToDeck(CardLibrary.ShrugItOff());
            // mainPlayer.AddCardToDeck(CardLibrary.DeadlyPoison());
            mainPlayer.AddCardToDeck(CardLibrary.GetBehind());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.TwinStrike());
            mainPlayer.AddCardToDeck(CardLibrary.Strike());
            // mainPlayer.AddCardToDeck(CardLibrary.Strike());
            // mainPlayer.AddCardToDeck(CardLibrary.Strike());
            // mainPlayer.AddCardToDeck(CardLibrary.Thunder());
            // mainPlayer.AddCardToDeck(CardLibrary.Bash());
            mainPlayer.abilities.Add(AbilityLibrary.MoveLeft());
            mainPlayer.abilities.Add(AbilityLibrary.MoveRight());
            mainPlayer.abilities.Add(AbilityLibrary.Strike());

            // Character ally = new NonPlayableCharacter(80,"Roberto",new Energy(2),CharacterModelLibrary.KnightCharacterModel());
            // ally.AddCardToDeck(CardLibrary.GetBehind());
            // Character ally2 = new Character(80,"Mario",new Energy(3));
            List <Character> allyTeam = new List <Character>();
            MoveCharacterToBoardColumn(mainPlayer, 0);
            // MoveCharacterToBoardColumn(ally,1);
            // MoveCharacterToBoardColumn(mainPlayer,0);
            // MoveCharacterToBoardColumn(mainPlayer,0);
            allyTeam.Add(mainPlayer);
            // allyTeam.Add(mainPlayer);
            // allyTeam.Add(mainPlayer);
            // ally.TurnRight();
            // allyTeam.Add(ally);
            // allyTeam.Add(ally2);
            teams.Add(allyTeam);

            List <Character> NpcTeam = new List <Character>();
            teams.Add(NpcTeam);


            Character Npc = new NonPlayableCharacter(80, "bicho", new Energy(3), CharacterModelLibrary.GoblinCharacterModel());
            Npc.AddCardToDeck(CardLibrary.Thrash());
            NpcTeam.Add(Npc);
            MoveCharacterToBoardColumn(Npc, 1);
            Npc.OnCharacterDead += CheckCombatEndCondition;

            Character Npc2 = new NonPlayableCharacter(80, "bicho2", new Energy(3), CharacterModelLibrary.GoblinCharacterModel());
            Npc2.AddCardToDeck(CardLibrary.Bellow());
            NpcTeam.Add(Npc2);
            MoveCharacterToBoardColumn(Npc2, 1);
            Npc2.OnCharacterDead += CheckCombatEndCondition;



            // NpcTeam.Add(Npc2);
            // MoveCharacterToBoardColumn(Npc2,1);
            // MoveCharacterToBoardColumn(Npc2,3);
            // MoveCharacterToBoardColumn(Npc2,4);
            // MoveCharacterToBoardColumn(Npc2,5);
            // MoveCharacterToBoardColumn(Npc,3);
            // MoveCharacterToBoardColumn(Npc,4);
            // MoveCharacterToBoardColumn(Npc,4);
            // MoveCharacterToBoardColumn(Npc,4);
            // MoveCharacterToBoardColumn(Npc,1);
            InstanceCharacters();
        }
    }