示例#1
0
        public MonoMapMsg getMapMsg(MsgEvent ev)
        {
            GameObject obj = Instantiate(mapMsg) as GameObject;
            MonoMapMsg msg = obj.GetComponent <MonoMapMsg>();

            return(msg);
        }
        public void SetInfo(MsgEvent v)
        {
            info.text = v.msg;
            targetHex = v.hex;

            int priority = (int)(v.priority);

            if (priority == MsgEvent.LEVEL_BLUE)
            {
                background.color = new Color(0, 0, 0.7f);
                info.color       = Color.white;
            }
            if (v.beneficial)
            {
                if (priority == MsgEvent.LEVEL_GREEN)
                {
                    background.color = new Color(0, 0.8f, 0);
                }
                else if (priority == MsgEvent.LEVEL_DARK_GREEN)
                {
                    background.color = new Color(0, 0.6f, 0);
                }
                else if (priority == MsgEvent.LEVEL_DARK_GREEN2)
                {
                    background.color = new Color(0, 0.3f, 0);
                }
            }
            else
            {
                if (priority == MsgEvent.LEVEL_RED)
                {
                    background.color = new Color(0.8f, 0, 0);
                }
                else if (priority == MsgEvent.LEVEL_ORANGE)
                {
                    background.color = new Color(0.8f, 0.5f, 0);
                }
                else if (priority == MsgEvent.LEVEL_YELLOW)
                {
                    background.color = new Color(0.8f, 0.8f, 0);
                }
            }
            if (priority == MsgEvent.LEVEL_GRAY)
            {
                background.color = new Color(0.5f, 0.5f, 0.5f);
            }
        }
示例#3
0
 public int CompareTo(MsgEvent other)
 {
     return(Math.Sign(priority - other.priority));
 }
示例#4
0
 internal void addMessage(MsgEvent msgEvent)
 {
     turnMessages.Add(msgEvent);
 }