Ejemplo n.º 1
0
 protected void Start()
 {
     ownResource = GridManager.instance.GetResources(location);
     if (ownResource)
     {
         ownResource.GetComponentInChildren <Renderer>().enabled = false;
     }
     RefreshMesh();
     RefreshText();
     Instantiate(PrefabManager.instance.buildingParticle,
                 transform.position + PrefabManager.instance.buildingParticle.transform.position,
                 PrefabManager.instance.buildingParticle.transform.rotation);
 }
Ejemplo n.º 2
0
 public override void BePickUp(Player player)
 {
     base.BePickUp(player);
     currentResourceCount--;
     if (currentResourceCount == 0)
     {
         if (ownResource)
         {
             ownResource.GetComponentInChildren <Renderer>().enabled = true;
         }
         Destroy(gameObject);
     }
     player.PickUp(ProjectileType.RawMaterial, _color);
 }