Exemplo n.º 1
0
 //this is our function to update the games Live Tile
 public void UpdateTile(float score)
 {
     //first we create a holder variable
     //and asign it to the default Tile
     UnityEngine.WSA.Tile liveTile = Tile.main;
     //then we update the tile with our latest high score
     //the first three strings are for images (medium,wide,large)
     //the last string is for text to display
     //you can also pass in an XML file to describe the tile
     liveTile.Update("", "", "", "Best round time: " + score.ToString("0.00"));
 }
Exemplo n.º 2
0
 static public int StopPeriodicUpdate(IntPtr l)
 {
     try {
         UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
         self.StopPeriodicUpdate();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 3
0
 static public int get_exists(IntPtr l)
 {
     try {
         UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.exists);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 4
0
 static public int RemoveBadge(IntPtr l)
 {
     try {
         UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
         self.RemoveBadge();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 5
0
 static public int UpdateBadgeNumber(IntPtr l)
 {
     try {
         UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
         System.Single        a1;
         checkType(l, 2, out a1);
         self.UpdateBadgeNumber(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 6
0
 static public int PeriodicUpdate(IntPtr l)
 {
     try {
         UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
         System.String        a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         self.PeriodicUpdate(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 7
0
 static public int Delete(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
             self.Delete();
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(UnityEngine.Rect)))
         {
             UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
             UnityEngine.Rect     a1;
             checkValueType(l, 2, out a1);
             self.Delete(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(UnityEngine.Vector2)))
         {
             UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
             UnityEngine.Vector2  a1;
             checkType(l, 2, out a1);
             self.Delete(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 8
0
 static public int Update(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             self.Update(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 5)
         {
             UnityEngine.WSA.Tile self = (UnityEngine.WSA.Tile)checkSelf(l);
             System.String        a1;
             checkType(l, 2, out a1);
             System.String a2;
             checkType(l, 3, out a2);
             System.String a3;
             checkType(l, 4, out a3);
             System.String a4;
             checkType(l, 5, out a4);
             self.Update(a1, a2, a3, a4);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 9
0
 /// <summary>
 ///   <para>Gets all secondary tiles.</para>
 /// </summary>
 /// <returns>
 ///   <para>An array of Tile objects.</para>
 /// </returns>
 public static Tile[] GetSecondaries()
 {
   string[] allSecondaryTiles = Tile.GetAllSecondaryTiles();
   Tile[] tileArray = new Tile[allSecondaryTiles.Length];
   for (int index = 0; index < allSecondaryTiles.Length; ++index)
     tileArray[index] = new Tile(allSecondaryTiles[index]);
   return tileArray;
 }