Example #1
0
 public void UpgradeDrill(DrillType type, int cost)
 {
     if (gems >= cost)
     {
         gems -= cost;
         drill.SetType(type);
     }
 }
Example #2
0
 /// <summary>
 /// Costruttore.
 /// </summary>
 /// <param name="name">Nome del tool</param>
 /// <param name="diameter">Diametro foro</param>
 /// <param name="quantity">Quantità dei fori</param>
 /// <param name="type">Tipo metalizzazione</param>
 /// <param name="unit">Unità di misura</param>
 public DrillTool(string name, double diameter, int quantity, DrillType type, Units unit)
     : this()
 {
     ToolName      = name;
     DrillDiameter = diameter;
     DrillQuantity = quantity;
     Type          = type;
     Unit          = unit;
 }
 public void SetDrillType(DrillType type)
 {
     this.type = type;
 }
 void Start()
 {
     destroyRockSound = GetComponent <AudioSource>();
     this.type        = DrillType.DEFAULT;
 }
Example #5
0
 public void SetType(DrillType nType)
 {
     type = nType;
 }
Example #6
0
 private void GameStart()
 {
     type = DrillType.STONE;
 }
Example #7
0
 private void Awake()
 {
     collider = GetComponent <BoxCollider2D>();
     GameEventManager.GameStart += GameStart;
     type = DrillType.STONE;
 }
Example #8
0
 public static int SetType(int value, DrillType type)
 {
     return(Terrain.ReplaceData(value, (Terrain.ExtractData(value) & -16) | ((int)type & 0xF)));
 }