Esempio n. 1
0
        char[,] charMap; //= MapToCharArray(size);


        public Brain()
        {
            //init all states
            miningState.Init(this);
            upgradeState.Init(this);
            exploreState.Init(this);
            combatState.Init(this);
            returnHomeState.Init(this);
            stealthState.Init(this);


            currentState  = miningState;
            upgradeLevels = new Dictionary <int, int>()
            {
                { 1, 10000 }, { 2, 15000 }, { 3, 25000 }, { 4, 50000 }, { 5, 100000 }, { 6, int.MaxValue }
            };
            currentUpgrade = new Dictionary <UpgradeType, int>()
            {
                { UpgradeType.AttackPower, 0 }, { UpgradeType.CarryingCapacity, 0 }, { UpgradeType.CollectingSpeed, 0 }, { UpgradeType.Defence, 0 }, { UpgradeType.MaximumHealth, 0 }
            };
        }
Esempio n. 2
0
 private void handleCombatStarted(GridEntity enemy)
 {
     nextState = COMBAT_STATE.Init(enemy);
 }