Beispiel #1
0
    public void Atack()
    {
        GamaManager.Instance.Board.OnPiceMove(select_pieces.sell, moveSell);
        GamaManager.Instance.Board.AllAttack(select_pieces);
        select_pieces.setSell(moveSell);
        setControlTeam((control_team + 1) % 2);
        GamaManager.Instance.Board.allAttackOff();
        step = 0;
        GamaManager.Instance.command_list.ALLSetInteractable(false);
        int win_team_num = GamaManager.Instance.kings_info.WinTeam();

        if (win_team_num != -1)
        {
            step      = Step.ACTIVITY;
            turn.text = (win_team_num + "の勝利");
        }
    }
Beispiel #2
0
    public void CreatePiece(PieceNum _piece, int x, int y, int _team)
    {
        GameObject obj = Instantiate(pieces[(int)_piece]);
        piece      pic = obj.GetComponent <piece>();

        pic.setSell(new Vector2(x, y));
        pic.team_number = _team;
        if (_team == 1)
        {
            obj.GetComponent <Renderer>().material.color = new Color(0, 1, 0);
        }
    }
Beispiel #3
0
    public void CreatePiece(PieceNum _piece, int x, int y, int _team)
    {
        GameObject obj = Instantiate(pieces[(int)_piece]);
        piece      pic = obj.GetComponent <piece>();

        pic.setSell(new Vector2(x, y));
        pic.team_number = _team;
        pic.piece_num   = _piece;
        if (_team == 1)
        {
            obj.GetComponent <Renderer>().material.color = new Color(0, 1, 0);
        }
        if (PieceNum.KING == _piece)
        {
            GamaManager.Instance.kings_info.kings.Add(pic);
        }
    }