Exemplo n.º 1
0
 /// <summary>
 /// Sets the ore's sprite
 /// </summary>
 /// <param name="orePath">the path to the ore's sprite</param>
 /// <returns>Returns itself (Used for linking methods together)</returns>
 public Block SetOreSprite(string orePath)
 {
     gameObject.GetComponent <SpriteRenderer>().sprite = Image = Sprite.Create(ImageHelper.AlphaBlend(Resources.Load <Sprite>("Sprites/Blocks/stone").texture,
                                                                                                      Resources.Load <Sprite>(orePath).texture), new Rect(0, 0, 32, 32), new Vector2(0.5f, 0.5f), 32);
     return(this);
 }