Beispiel #1
0
        void UpdatePosition(float nodeRadian, BowListItem node)
        {
            float centerX = -m_radius *Mathf.Cos(m_shiftDegree *Mathf.Deg2Rad);

            float centerY   = m_radius * Mathf.Sin(m_shiftDegree * Mathf.Deg2Rad);
            float posRadian = nodeRadian + m_shiftDegree * Mathf.Deg2Rad;

            node.gameObject.transform.localPosition = new Vector3(centerX + m_radius * Mathf.Cos(posRadian), centerY - m_radius * Mathf.Sin(posRadian));
            float scale = 1 - Mathf.Abs(nodeRadian) / m_maxRadian * (1 - m_minScale);

            if (m_minScale != 1)
            {
                node.gameObject.transform.localScale = new Vector3(scale, scale);
            }

            if (node.m_mask != null)
            {
                float alpha = Mathf.Abs(nodeRadian) / m_maxRadian * m_maxAlpha;
                Color color = new Color(1, 1, 1, alpha);
                node.m_mask.color = color;
            }
        }
Beispiel #2
0
 void RecollectNode(BowListItem node)
 {
     node.gameObject.SetActive(false);
     inactiveNodes.Add(node);
 }