Beispiel #1
0
 /// <summary>
 /// Grab materials from a friendly unit. Doesn't use a action.
 /// </summary>
 /// <param name="unit">The unit you are grabbing the resources from.</param>
 /// <param name="amount">The amount of materials to you with to grab. Amounts &lt;= 0 will pick up all the materials that the unit can.</param>
 /// <param name="material">The material the unit will pick up. 'genarium', 'rarium', 'legendarium', or 'mythicite'.</param>
 /// <returns>True if successfully taken, false otherwise.</returns>
 public bool Transfer(Stardash.Unit unit, int amount, string material)
 {
     return(this.RunOnServer <bool>("transfer", new Dictionary <string, object> {
         { "unit", unit },
         { "amount", amount },
         { "material", material }
     }));
 }
Beispiel #2
0
 /// <summary>
 /// Attacks the specified unit.
 /// </summary>
 /// <param name="enemy">The Unit being attacked.</param>
 /// <returns>True if successfully attacked, false otherwise.</returns>
 public bool Attack(Stardash.Unit enemy)
 {
     return(this.RunOnServer <bool>("attack", new Dictionary <string, object> {
         { "enemy", enemy }
     }));
 }