Skip to content

Commit

Permalink
GoodThought: show train gfx dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishrock123 committed Feb 1, 2020
1 parent 9de6e6f commit 8e37032
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Scripts/GoodThought.cs
Expand Up @@ -22,6 +22,8 @@ public class GoodThought : MonoBehaviour
// Start is called before the first frame update
public Transform targetAnchor;

public GameObject trainGFX;

void Start()
{
}
Expand Down Expand Up @@ -65,11 +67,13 @@ public void AttachTo(Transform anchor)
{
targetAnchor = anchor;
attached = true;
trainGFX.SetActive(true);
}

public void Detatch()
{
targetAnchor = null;
attached = false;
trainGFX.SetActive(false);
}
}

0 comments on commit 8e37032

Please sign in to comment.