// Start is called before the first frame update void Start() { SpriteRef = GameObject.Find("SpriteRef").GetComponent <SpritesList>(); TestItem = GameObject.Find("TestItem").GetComponent <Item>(); TestItem.ItemName = "Wood"; TestItem.ItemMaxAmount = 99f; TestItem.ItemAmount = 0; TestItem.Value = 100f; TestItem.HQValue = 300f; TestItem.ItemImage = SpriteRef.Sprite[0]; TestItemTwo = GameObject.Find("TestItem2").GetComponent <Item>(); TestItemTwo.ItemName = "Iron Ingot"; TestItemTwo.Value = 300f; TestItemTwo.HQValue = 500f; TestItemTwo.ItemImage = SpriteRef.Sprite[1]; TestItemTwo.IsHighQuality = false; Sword = GameObject.Find("SwordItem").GetComponent <Item>(); Sword.ItemName = "Wooden Sword"; Sword.ItemMaxAmount = 10f; Sword.ItemAmount = 0f; Sword.Value = 750f; Sword.HQValue = 1500f; Sword.ItemImage = SpriteRef.Sprite[2]; Sword.IsHighQuality = false; Pick = GameObject.Find("PickItem").GetComponent <Item>(); Pick.ItemName = "Pickaxe"; Pick.ItemMaxAmount = 10f; Pick.ItemAmount = 0f; Pick.Value = 900f; Pick.HQValue = 2000f; Pick.ItemImage = SpriteRef.Sprite[3]; Pick.IsHighQuality = false; }
void MakeInstance( ) { if (instance == null) { instance = this; } }
//начало переименования спрайта private void SpriteRenameButton_Click(object sender, EventArgs e) { if (CurrentSprite == null) { return; } SpritesList.CurrentCell = SpritesList.Rows[SpritesList.CurrentRow.Index].Cells[0]; SpritesList.BeginEdit(true); }