Skip to content

Commit

Permalink
add: electric animation code
Browse files Browse the repository at this point in the history
  • Loading branch information
jihu0331 committed Dec 21, 2024
1 parent 4a7295a commit d44a073
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Assets/SWPPT3/Scripts/Main/ConductorLogic/Receptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ public void UpdateState(bool state)
{
connectedStateSource.State = state;
}
if (state)
{
Animator receptorAnimation = transform.GetComponent<Animator>();
receptorAnimation.SetBool("IsOn", true);
Animator emmiterAnimation = transform.parent.Find("Electric_Wire").GetComponent<Animator>();
emmiterAnimation.SetBool("IsOn", true);
}
//Debug.Log("Receptor:"+state);
}
}
Expand Down

0 comments on commit d44a073

Please sign in to comment.