コード例 #1
0
ファイル: OpeningState.cs プロジェクト: yegorf1/Circles
        public OpeningState(bool isLocal)
        {
            this.isLocal = isLocal;
            this.game = LinesGame.instance;
            this.animationTime = 0;

            this.game.InitFields();
        }
コード例 #2
0
ファイル: ClosingState.cs プロジェクト: yegorf1/Circles
        public ClosingState(int turn)
        {
            this.turn = turn;
            this.game = LinesGame.instance;
            this.animationTime = 0;

            this.game.FirstPlayerField.ResetAnimation();
            this.game.SecondPlayerField.ResetAnimation();
        }
コード例 #3
0
ファイル: PreSelectState.cs プロジェクト: yegorf1/Circles
        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;
        }
コード例 #4
0
ファイル: GameState.cs プロジェクト: yegorf1/Circles
        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>();
        }
コード例 #5
0
ファイル: SelectState.cs プロジェクト: yegorf1/Circles
        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;
        }