Updated Level3 - Caleb Brown
This commit is contained in:
parent
d654aca5d4
commit
fefc995f3a
Binary file not shown.
@ -29,13 +29,13 @@ public class MovingPlatform : MonoBehaviour
|
||||
|
||||
void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (other.gameObject.tag == "Player")
|
||||
if (other.gameObject.tag == "Scene_Object")
|
||||
other.transform.parent = transform;
|
||||
}
|
||||
|
||||
void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
if (other.gameObject.tag == "Player")
|
||||
if (other.gameObject.tag == "Scene_Object")
|
||||
other.transform.parent = null;
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public class Platform : MonoBehaviour
|
||||
//Updates all of the children's SpriteRender sprites
|
||||
foreach (SpriteRenderer i in GetComponentsInChildren<SpriteRenderer>())
|
||||
{
|
||||
if (i.tag != "Player")
|
||||
if (i.tag != "Scene_Object")
|
||||
{
|
||||
i.transform.localScale = new Vector3(scaleFactor, scaleFactor);
|
||||
i.sprite = sprite;
|
||||
|
Reference in New Issue
Block a user