private IEnumerator DropLootCoroutine(GridObject gridObject, Vector3 dropLocation, float delayAppear = 1.0f) { LootHandler lh = gridObject.gameObject.GetComponent <LootHandler>(); if (lh != null) { GameObject lootObjectToDrop = lh.RequestLootDrop(dropLocation, forced: true); if (lootObjectToDrop != null) { MeshRenderer renderer = lootObjectToDrop.GetComponentInChildren <MeshRenderer>(); renderer.enabled = false; gm.AddObjectToGrid(lootObjectToDrop, gm.WorldToGrid(dropLocation)); gridObjectsInPlay.Add(lootObjectToDrop.GetComponent <Loot>()); Rotator lootRotator = lootObjectToDrop.GetComponent <Rotator>(); lootRotator.enabled = true; lootRotator.ApplyRotation("Left"); yield return(new WaitForSeconds(delayAppear)); renderer.enabled = true; } } }