Esempio n. 1
0
        private GameController(
            Field field,
            PlayerTurnSignal playerTurnSignal,
            EnemyTurnSignal enemyTurnSignal,
            WaitForPlayerTurnSignal waitForPlayerTurnSignal,
            WaitForEnemyTurnSignal waitForEnemyTurnSignal,
            AttackTurnAction.Factory attackPerformerFactory,
            SceneLauncher sceneLauncher,
            IVictoryCondition victoryCondition,
            ILossCondtion lossCondtion)
        {
            this.field                   = field;
            this.playerTurnSignal        = playerTurnSignal;
            this.enemyTurnSignal         = enemyTurnSignal;
            this.waitForPlayerTurnSignal = waitForPlayerTurnSignal;
            this.waitForEnemyTurnSignal  = waitForEnemyTurnSignal;
            this.attackPerformerFactory  = attackPerformerFactory;
            this.sceneLauncher           = sceneLauncher;
            this.victoryCondition        = victoryCondition;
            this.lossCondtion            = lossCondtion;

            this.turnQueue = new Queue <Character> ();

            turnQueue.Enqueue(field.Player);
            foreach (var enemy in field.Enemies)
            {
                turnQueue.Enqueue(enemy);
            }
        }
Esempio n. 2
0
 public Game(int gameId, IList <IPlayer> players, ISupply supply, IVictoryCondition victoryCondition)
 {
     GameId           = gameId;
     Players          = players;
     Supply           = supply;
     VictoryCondition = victoryCondition;
     Components       = new Components();
 }
Esempio n. 3
0
        public GameManager(IMap map, IVictoryCondition victoryCondition, IPlayer player, int numOfDungeonEnemies = 3, string configPath = null)
        {
            Map = map ?? throw new ArgumentNullException(nameof(map));
            VictoryCondition    = victoryCondition ?? throw new ArgumentNullException(nameof(victoryCondition));
            Player              = player ?? throw new ArgumentNullException(nameof(player));
            NumOfDungeonEnemies = numOfDungeonEnemies;

            ConfigPath = configPath;
        }
Esempio n. 4
0
    void Start()
    {
        CustomCamera = GameObject.FindObjectOfType<CustomCamera>();
        Radar.Player = CustomCamera.Target;

        m_hActors = new List<Actor>(LobbyManager.Instance.GetActors());
        if (m_hActors != null)
        {
            m_hActors.ForEach(hA =>
            {
                if (!scores.ContainsKey(hA))
                    scores.Add(hA, 0);
            });
        }

        LobbyManager.Instance.Created += Instance_Created;

        //ToDo: Rendere victory condition generica
        m_hVictoryCondition = new DeathMatchWinCondition(ScoreToWin);

        Cursor.SetCursor(InGameMouseCursor, new Vector2(16, 16), CursorMode.Auto);
        
    }