Ejemplo n.º 1
0
        /// <summary>
        /// 新しく視認された情報で敵AIの情報を更新する
        /// </summary>
        /// <param name="input"></param>
        private void UpdateEnUnits(Input input)
        {
            foreach (var unit in input.EnUnits)
            {
                EnUnit u = new EnUnit(unit);

                enUnits[u.Id] = u;

                if (u.Type == UnitType.Castle)
                {
                    enCastle = u;
                }
            }
        }
Ejemplo n.º 2
0
        private void StageStart()
        {
            myUnits  = new Dictionary <int, MyUnit>();
            enUnits  = new Dictionary <int, EnUnit>();
            enCastle = new EnUnit(UnitType.Castle);
            enCastle.NotDiscover();

            resource = new bool[GameConstant.FieldSize, GameConstant.FieldSize];
            seeArea  = new bool[GameConstant.FieldSize, GameConstant.FieldSize];
            for (int x = 0; x < GameConstant.FieldSize; x++)
            {
                for (int y = 0; y < GameConstant.FieldSize; y++)
                {
                    resource[x, y] = false;
                    seeArea[x, y]  = false;
                }
            }
        }