Exemplo n.º 1
0
        public AbsMahSignItem GetSign(MahSignType type)
        {
            AbsMahSignItem item = null;

            for (int i = 0; i < Signs.Count; i++)
            {
                if (Signs[i].SignType == type)
                {
                    item = Signs[i];
                }
            }
            return(item);
        }
Exemplo n.º 2
0
        private AbsMahSignItem CreateSign(MahSignType type, Anchor anchor)
        {
            AbsMahSignItem item = Signs[0];

            if (item.SignType != MahSignType.None)
            {
                item = Instantiate(item);
                Signs.Add(item);
            }

            item.transform.SetParent(transform);
            item.transform.localRotation = Quaternion.Euler(Vector3.zero);
            item.gameObject.layer        = gameObject.layer;
            item.SetState(true);

            var pos = GetAnchor(anchor).Vector3;

            item.SetTranslate(pos);
            item.SignType = type;
            return(item);
        }