Beispiel #1
0
 public Piece(Config.PieceColor color, Config.PieceType type, int x, int y)
 {
     this.color = color;
     this.type  = type;
     this.x     = x;
     this.y     = y;
 }
Beispiel #2
0
    public void InitView(GameObject gameObject, Piece pieceData, bool pve = false)
    {
        isPVE        = pve;
        m_gameObject = gameObject;
        //m_gameObject.transform.localRotation = Quaternion.Euler(0, 180, 0);
        m_Attack   = gameObject.transform.Find("m_Attack").gameObject;
        m_pvpProxy = App.Facade.RetrieveProxy("PVPProxy") as PVPProxy;
        selfColor  = m_pvpProxy.GetSelfColor();
        m_type     = pieceData.type;
        pieceColor = pieceData.color;
        InitPieceShow(pieceData);
        m_name     = m_X + "_" + m_Z;
        m_mediator = new PieceItemMediator(this, m_name);
        App.Facade.RegisterMediator(m_mediator);
        m_mediator.InitPieceData(pieceData);

        OpenView();
    }