public void MovePlayer(int from, int to, float counter = 0.25f)
    {
        tilePos = to;
        xPos    = tilePos % 40;
        yPos    = tilePos / 40;

        Player.name = "Player" + to.ToString();

        AnimaUnit animaUnit = new AnimaUnit();

        animaUnit.MoveUnit(Player, from, to, counter);

        Tile.passable[from] = true;
        Tile.passable[to]   = false;

        PlayerStat playerStat = new PlayerStat();

        playerStat.GainRage(-1);

        if (Artifact.titles[to] != Artifact.Title.None)
        {
            Artifact.Title title = Artifact.titles[to];

            Artifact artifact = new Artifact();
            artifact.Destroy(to);

            AbilityEffect ability = new AbilityEffect();
            ability.GainArtifact(title);
        }

        Turn.currentTurn = Turn.CurrentTurn.PlayerNeutral;
    }
Beispiel #2
0
    public void StartGameClicked(string title)
    {
        Level level = new Level();

        level.NewLevel();

        AbilityEffect ability = new AbilityEffect();

        switch (title)
        {
        case "Archer":
            ability.GainArtifact(Artifact.Title.Crossbow);
            break;

        case "Undead":
            ability.GainArtifact(Artifact.Title.BoneSword);
            break;

        case "Mage":
            ability.GainArtifact(Artifact.Title.Fireball);
            break;
        }
    }