// Update is called once per frame void Update() { if (Input.GetMouseButton(0)) { touchPos = Camera.main.ScreenToWorldPoint(Input.mousePosition); hit = Physics2D.Raycast(touchPos, Vector2.zero, 10, 1 << 9); if (hit.collider != null && objectHit == null) { objectHit = hit.transform.parent; oldPostObjectHit = objectHit.position; objectHit.transform.localScale = Vector3.one; } if (objectHit != null) { objectHit.transform.position = new Vector3(touchPos.x, touchPos.y + 5f, objectHit.transform.position.z); } } else if (Input.GetMouseButtonUp(0)) { if (objectHit != null) { objectHit.transform.localScale = Vector3.one * 0.8f; objectHit.position = oldPostObjectHit; InsertShapeMatrix newInsert = objectHit.GetComponentInChildren <BitController>().InsertValueToMatrix100(); Debug.Log(objectHit.GetComponentInChildren <BitController>().name); if (newInsert != null) { MatrixManager.Instance().InsertShapeMatrix(newInsert); } objectHit = null; } } }
private void UpdateValueMatrix() { valueMatrix1010 = MatrixManager.Instance().ValueMatrix1010; }