Example #1
0
    public PlayerManager createLevel(int levelNumber)
    {
        Level level = new Level();

        level.initLevel(levelNumber);
        GameObject    archerAbilityRender = GameObject.Find("ArcherAbilityArcRender");
        ArcherAbility archerAbility       = new ArcherAbility(archerAbilityRender.GetComponent <LineRenderer>());
        PlayerManager playerManager       = new PlayerManager(archerAbility);

        return(playerManager);
    }
Example #2
0
        public PlayerAbility(string name, int comboCost, int rank, ArcherAbility archerAbility, int minLevel)
        {
            Name               = name;
            ComboCost          = comboCost;
            Rank               = rank;
            ArcAbilityCategory = archerAbility;
            MinLevel           = minLevel;
            switch (ArcAbilityCategory)
            {
            case ArcherAbility.Distance:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(25, 50);
                break;

            case ArcherAbility.Gut:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(
                    15, 5, 1, 3, OffensiveType.Bleed);
                break;

            case ArcherAbility.Precise:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(50);
                break;

            case ArcherAbility.Stun:
                DamageGroup = DamageType.Physical;
                Stun        = new Stun(15, 1, 3);
                break;

            case ArcherAbility.Wound:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(
                    5, 10, 1, 5, OffensiveType.Bleed);
                break;

            case ArcherAbility.Double:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(25);
                break;

            case ArcherAbility.Bandage:
                Healing = new Healing(25, 5, 1, 3);
                break;

            case ArcherAbility.SwiftAura:
                ChangeAmount = new ChangeAmount(15, 1, 600);
                break;

            case ArcherAbility.ImmolatingArrow:
                DamageGroup = DamageType.Fire;
                Offensive   = new Offensive(
                    25, 5, 1, 3, OffensiveType.Fire);
                break;

            case ArcherAbility.Ambush:
                DamageGroup = DamageType.Physical;
                Offensive   = new Offensive(50);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Example #3
0
 public PlayerManager(ArcherAbility archerAbility)
 {
     this.archerAbility = archerAbility;
     currentAbility     = this.archerAbility;
     currentAbility.startAbility();
 }