Exemple #1
0
        public OpeningState(bool isLocal)
        {
            this.isLocal = isLocal;
            this.game = LinesGame.instance;
            this.animationTime = 0;

            this.game.InitFields();
        }
Exemple #2
0
        public ClosingState(int turn)
        {
            this.turn = turn;
            this.game = LinesGame.instance;
            this.animationTime = 0;

            this.game.FirstPlayerField.ResetAnimation();
            this.game.SecondPlayerField.ResetAnimation();
        }
Exemple #3
0
        public PreSelectState(Color color, Texture2D title, Texture2D first, Texture2D second, OnSelectHandler onFirst, OnSelectHandler onSecond, bool isOpening)
        {
            this.color = color;
            this.title = title;
            this.first = first;
            this.second = second;
            this.onFirst = onFirst;
            this.onSecond = onSecond;
            this.isOpening = isOpening;

            this.game = LinesGame.instance;
        }
Exemple #4
0
        public GameState()
        {
            GameState.instance = this;
            CurrentTurn = Constants.FIRST_PLAYER;

            this.game = LinesGame.instance;

            this.InputManager = new InputManager();
            this.InputManager.OnMouseDown += OnMouseDown;
            this.InputManager.OnClick += OnMouseUp;

            this.OldLines = new List<Line>();
        }
Exemple #5
0
        public SelectState(Color color, Texture2D title, Texture2D first, Texture2D second, PreSelectState.OnSelectHandler onFirst, PreSelectState.OnSelectHandler onSecond)
        {
            this.color = color;
            this.title = title;
            this.first = first;
            this.second = second;
            this.onFirst = onFirst;
            this.onSecond = onSecond;

            this.game = LinesGame.instance;
            this.lineWidth = 0.5f;

            this.inputManager = new InputManager();
            this.inputManager.OnClick += OnDown;
        }