// Use this for initialization void Start() { elroy = PersistentEngine.player.transform; AddSprite(transform); if (sortingLayerNameInFrontOfElroy == "") { sortingLayerNameInFrontOfElroy = WalkBehind.GetSortingLayerNameById(sortingLayerInFrontOfElroy); } }
void Start() { elroy = PersistentEngine.player.transform; sprite = GetComponent <SpriteRenderer>(); originalSortingLayerName = sprite.sortingLayerName; if (sortingLayerNameInFrontOfElroy == "") { sortingLayerNameInFrontOfElroy = WalkBehind.GetSortingLayerNameById(sortingLayerInFrontOfElroy); } }
IEnumerator Start() { yield return(null); flipYCoordinate = PersistentEngine.scene.flipYCoordinate; sprite = GetComponent <SpriteRenderer>(); originalSortingLayerName = sprite.sortingLayerName; originalSortingIndex = sprite.sortingOrder; if (sortingLayerNameInFrontOfElroy == "") { sortingLayerNameInFrontOfElroy = WalkBehind.GetSortingLayerNameById(sortingLayerInFrontOfElroy); } }