Beispiel #1
0
 internal void SpawnText(Vector3 iniPosPass, string msgP = "")
 {
     //spwan a message
     if (msgP != "")
     {
         textMessage               = (Btn3D)General.Create(Root.menusTextMiddle, iniPosPass);
         textMessage.MoveSpeed     = 40f; //so fade happens
         textMessage.FadeDirection = "FadeIn";
         textMessage.GetComponent <GUIText>().text = msgP;
     }
     //spwans a tip
     else if (Program.MOUSEOVERTHIS != null)
     {
         if (Tips.ReturnTip(Program.MOUSEOVERTHIS.name) != "No tips")
         {
             if (tipHover)
             {
                 tipMenu               = (Btn3D)General.Create(Root.menusTextLeft, iniPosPass);
                 tipMenu.MoveSpeed     = 40f; //so fade happens
                 tipMenu.FadeDirection = "FadeIn";
                 tipMenu.GetComponent <GUIText>().text = Tips.ReturnTip(Program.MOUSEOVERTHIS.name);
                 tipHover = false;
             }
             else if (tipMenu.GetComponent <GUIText>().text != Tips.ReturnTip(Program.MOUSEOVERTHIS.name))
             {
                 tipMenu.GetComponent <GUIText>().text = Tips.ReturnTip(Program.MOUSEOVERTHIS.name);
                 tipMenu.transform.position            = iniPosPass;
             }
         }
         else if (Tips.ReturnTip(Program.MOUSEOVERTHIS.name) == "No tips")
         {
             DestroyTipMenu();
         }
     }
 }
Beispiel #2
0
 //matIndex is the index of the material in the inspector slot
 void SwitchMaterial(int matIndex)
 {
     if (hoveredTemp != null)
     {
         Material[] mats = hoveredTemp.GetComponent <Renderer>().materials;
         //if is more than one mat in the object
         if (mats.Length > 1)
         {
             mats[1] = hoveredTemp.materiales[matIndex];
             hoveredTemp.GetComponent <Renderer>().materials = mats;
         }
     }
 }
Beispiel #3
0
 public static void ScreenPrint(string newA)
 {
     newA     += "\n" + ScreenMsg;
     ScreenMsg = newA;
     textMessage.GetComponent <GUIText>().text = ScreenMsg;
 }