Exemplo n.º 1
0
    QueueItem new_sheet()
    {
        string    name  = "sheet" + sheet_count.ToString();
        InfoSheet sheet = new InfoSheet(name);

        sheet.addDynamic("initiative", (float)-sheet_count, float.PositiveInfinity, float.NegativeInfinity, (float)sheet_count, 1f, 1f);
        sheet.addDynamic("reverse", (float)sheet_count, float.PositiveInfinity, float.NegativeInfinity, (float)sheet_count, 1f, 1f);
        sheet.addDynamic(name, (float)sheet_count, float.PositiveInfinity, float.NegativeInfinity, (float)sheet_count, 1f, 1f);
        sheet_count++;
        return(new QueueItem(sheet));
    }
Exemplo n.º 2
0
 public void setName()
 {
     if (!set)
     {
         fieldName = nameText.GetComponent <Text>().text;
         if ("label" == type)
         {
             sheet.addText(fieldName, "", x, y, 0, 0);
         }
         else if ("dynamic" == type)
         {
             sheet.addDynamic(fieldName, val, max, x, y, 1, 1);
         }
         else if ("static" == type)
         {
             sheet.addStatic(fieldName, val, x, y, 1, 1);
         }
         else if ("text" == type)
         {
             sheet.addText(fieldName, text, x, y, 1, 1);
         }
         set = true;
     }
     else
     {
         print(nameText.GetComponent <Text>().text);
         if ("label" == type)
         {
             sheet.removeField(fieldName, "text");
             fieldName = nameText.GetComponent <Text>().text;
             sheet.addText(fieldName, "", x, y, 0, 0);
         }
         else if ("dynamic" == type)
         {
             sheet.removeField(fieldName, "dynamic");
             fieldName = nameText.GetComponent <Text>().text;
             sheet.addDynamic(fieldName, val, max, x, y, 1, 1);
         }
         else if ("static" == type)
         {
             sheet.removeField(fieldName, "static");
             fieldName = nameText.GetComponent <Text>().text;
             sheet.addStatic(fieldName, val, x, y, 1, 1);
         }
         else if ("text" == type)
         {
             sheet.removeField(fieldName, "text");
             fieldName = nameText.GetComponent <Text>().text;
             sheet.addText(fieldName, text, x, y, 1, 1);
         }
     }
 }