Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        tebanManager = GameObject.Find("TebanManager").GetComponent <TebanManager> ();
        tebanManager.isPlayer1Teban = true;
        gameStatusManager           = GameObject.Find("GameStatusManager").GetComponent <GameStatusManager> ();

        InitializeButtons();

        komas [0] = Hiyoko.GetComponent <KomaController> ();
        komas [1] = Kirin.GetComponent <KomaController> ();
        komas [2] = Zou.GetComponent <KomaController> ();
        komas [3] = Lion.GetComponent <KomaController> ();
        komas [4] = eHiyoko.GetComponent <KomaController> ();
        komas [5] = eKirin.GetComponent <KomaController> ();
        komas [6] = eZou.GetComponent <KomaController> ();
        komas [7] = eLion.GetComponent <KomaController> ();

        Print();

//		// 動かし方の例:Hiyoko(3,2)
//		te.from.dan = 0;
//		te.from.suji = 0;
//		te.to.dan = 3;
//		te.to.suji = 2;
//		te.koma = Koma.Hiyoko;
//		te.promote = false;
//		tePrint ();
//		Move (0, ref te);
    }
Exemplo n.º 2
0
//	public Sprite imagePlayer1Nari, imagePlayer2Nari;

    void Start()
    {
        gameobjectName = gameObject.name;

        boardManager = GameObject.Find("BoardManager").GetComponent <BoardManager>();
        tebanManager = GameObject.Find("TebanManager").GetComponent <TebanManager> ();

        // 画像設定
        image = GetComponent <Image> ();
        if (isPlayer1)
        {
            image.sprite = imagePlayer1;
        }
        else
        {
            image.sprite = imagePlayer2;
        }

        movableArea [0] = FR;
        movableArea [1] = F;
        movableArea [2] = FL;
        movableArea [3] = R;
        movableArea [4] = L;
        movableArea [5] = BR;
        movableArea [6] = B;
        movableArea [7] = BL;

//		// 駒の進む方向を決定
//		if (isPlayer1) {
//			direction = -1;
//		} else {
//			direction = 1;
//		}
    }