bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/WaypointChallenge.cs
2024-02-24 22:40:44 -05:00

28 lines
459 B
C#

using UnityEngine;
public class WaypointChallenge : Challenge
{
public Collectable m_target;
public int m_goalId;
public override void Initialize()
{
m_goalId = m_target.GoalId;
}
public override bool IsCompleted()
{
GameObject goal = WPFMonoBehaviour.levelManager.GetGoal(m_goalId);
if ((bool)goal)
{
return goal.GetComponent<Collectable>().Collected;
}
return false;
}
private void Awake()
{
m_type = ChallengeType.Box;
}
}