public void SpawnBox(GameObject boxPrefab) { //tobias help if (fillableBox) { return; } fillableBox = Instantiate(boxPrefab, boxPos.position, Quaternion.identity).GetComponent <ItemBoxController>(); }
public void SpawnBox(Vector3 size) { if (fillableBox) { return; } fillableBox = BoxCreator.Instance.Create <ItemBoxData>( boxPos.position, size, null ).GetComponent <ItemBoxController>(); }
private void Start() { if (instance == null) { instance = this; } else { return; } PrepareItems(); PrepareItemBoxes(); }
public void SpawnBox() { if (fillableBox) { return; } fillableBox = BoxCreator.Instance.Create <ItemBoxData>( boxPos.position, new Vector3( Random.Range(1f, 2f), Random.Range(0.75f, 1.25f), Random.Range(1f, 2f) ), null ).GetComponent <ItemBoxController>(); }
private void DisplayItem(ItemFeedMessage eventMessage) { Sprite icon = ItemBoxController.GetItemSprite(eventMessage.item); itemfeed.UseElement(eventMessage.userID, icon); }
public void Init(ItemBoxController p, int id) { parent = p; ID = id; }
public void Init(ItemBoxController controller) { parent = controller; }