private void SpawnMole(SpawnpointInGrass target) { mMoleWorking = true; mMole.isDigging = false; mMole.transform.position = target.transform.position; mMole.transform.rotation = target.transform.rotation; mMole.SetSortingLayer(target.sortingLayerName); mMole.ShowSprites(); //mMole.Appear(AppearComplete); }
public void SpawnBee(SpawnpointInGrass target) { GameObject spawnedBee = GameObject.Instantiate(beePrefab, target.transform.position, Quaternion.identity) as GameObject; spawnedBee.GetComponent <SpriteRenderer>().sortingLayerName = target.sortingLayerName; if (isNight) { spawnedBee.GetComponent <SpriteRenderer>().color = nightTint; } beeNextSpawnTime = Time.time + beeSpawnTimeSpan; }