public OthelloPieceBehaviour Put(OthelloZoneBehaviour z, bool turn) { prefab = GameObject.Find("OthelloPiecePrefab"); color = turn; OthelloPieceBehaviour p = base.Spawn(z.transform.position, Quaternion.identity).GetComponent <OthelloPieceBehaviour>(); p.color = turn; p.gameObject.transform.parent = z.transform; p.gameObject.GetComponent <Renderer>().material.color = color ? Color.white : new Color(0.5f, 0, 0.5f, 1); z.AddPiece(p); return(p); }
public void AddPiece(OthelloPieceBehaviour p) { piece = p; }