// initialize key values called from the belt this belongs to public void Initialize(Transform parent, Vector3 position, WhirlwindBelt belt) { transform.parent = parent; transform.position = position; this.belt = belt; Enable(false); }
// initialize important information passed from the belt this item belongs to public void Initialize(WhirlwindBelt belt, float radius, Vector3 idlePosition, BookInfo bookInfo) { this.belt = belt; this.radius = radius; this.idlePosition = idlePosition; this.bookInfo = bookInfo; itemImage.GetComponent<SpriteRenderer>().sprite = GetItemSprite(bookInfo.FileName); transform.position = idlePosition; }