public void Open(Unit.DropItem DropItem, DropItemEffect dropItemTemplate, int numGolds, DropGoldEffect dropGoldTemplate) { ((Animation)((Component)this).GetComponent <Animation>()).AddClip(this.OpenAnimation, ((Object)this.OpenAnimation).get_name()); ((Animation)((Component)this).GetComponent <Animation>()).Play(((Object)this.OpenAnimation).get_name()); this.mOpened = true; Transform transform = ((Component)this).get_transform(); if (numGolds > 0) { this.mDropGold = (DropGoldEffect)Object.Instantiate <DropGoldEffect>((M0)dropGoldTemplate); this.mDropGold.Gold = numGolds; ((Component)this.mDropGold).get_transform().set_position(transform.get_position()); ((Component)this.mDropGold).get_gameObject().SetActive(false); } if (!Object.op_Inequality((Object)dropItemTemplate, (Object)null) || DropItem == null) { return; } this.mDropItem = (DropItemEffect)Object.Instantiate <DropItemEffect>((M0)dropItemTemplate); ((Component)this.mDropItem).get_transform().set_position(Vector3.op_Addition(transform.get_position(), this.DropOffset)); if (Object.op_Inequality((Object)SceneBattle.Instance, (Object)null)) { SceneBattle.Popup2D(((Component)this.mDropItem).get_gameObject(), ((Component)this.mDropItem).get_transform().get_position(), 0, 0.0f); } this.mDropItem.DropItem = DropItem; ((Component)this.mDropItem).get_gameObject().SetActive(false); }
public void SetItem(Unit.DropItem item) { this.m_DropItem = item; }