public void SetEnds(OrbSlot _A, OrbSlot _B) { Debug.Log("SET ENDS : " + _A + " - " + _B); A = _A; B = _B; lr.SetPosition(0, A.gameObject.transform.position); lr.SetPosition(1, B.gameObject.transform.position); }
public void AddConnection(OrbSlot A, OrbSlot B) { Debug.Log("add conn : " + A + " - " + B); GameObject newConnection = GameObject.Instantiate(connectionPrefab, connectionParent); Connection c = newConnection.GetComponent <Connection>(); c.SetEnds(A, B); A.connectedOrbs.Add(B); B.connectedOrbs.Add(A); connections.Add(c); }
public void OnBeginDrag(PointerEventData eventData) { Debug.Log("OnBeginDrag"); if (_inOrbSlot) { _inOrbSlot.RemovedOrb(); _inOrbSlot = null; } _canvasGroup.alpha = _alphaFadeValue; _canvasGroup.blocksRaycasts = false; }
private void SetupOrbSlots() { int numRequirements = _spell.OrbRequirements.Count; for (int reqIndex = 0; reqIndex < numRequirements; reqIndex++) { Requirement req = _spell.OrbRequirements[reqIndex]; OrbType orbType = req.orbType; for (int i = 0; i < req.quantity; i++) { OrbSlot orbSlot = GameObject.Instantiate <OrbSlot>(_orbSlotPrefab, _orbSlotPositions[reqIndex + i].transform); orbSlot.Setup(_context, orbType, this); _orbSlots[reqIndex + i] = orbSlot; } } }
public ConnectionKey(OrbSlot A, OrbSlot B) { }
public void SetOrbSlot(OrbSlot orbSlot) { _inOrbSlot = orbSlot; }