Пример #1
0
    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);
    }
Пример #2
0
    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);
    }
Пример #3
0
    public void OnBeginDrag(PointerEventData eventData)
    {
        Debug.Log("OnBeginDrag");

        if (_inOrbSlot)
        {
            _inOrbSlot.RemovedOrb();
            _inOrbSlot = null;
        }

        _canvasGroup.alpha          = _alphaFadeValue;
        _canvasGroup.blocksRaycasts = false;
    }
Пример #4
0
    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;
            }
        }
    }
Пример #5
0
 public ConnectionKey(OrbSlot A, OrbSlot B)
 {
 }
Пример #6
0
 public void SetOrbSlot(OrbSlot orbSlot)
 {
     _inOrbSlot = orbSlot;
 }