1
0
Fork 0
Bildschirmflausch-LD41/Assets/Scripts/Objectives/FinishObjective.cs
2018-04-23 14:59:34 +02:00

23 lines
569 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FinishObjective : Objective {
public FinishObjective(Room caller) : base(caller) { }
public override void ActivateGoal(Player player) {
// Player reached the end => win
base.ActivateGoal(player);
UpdateGoal();
}
public override void UpdateGoal() {
ReachedGoal();
}
protected override void ReachedGoal() {
base.ReachedGoal();
GameController.instance.EndGame(GameController.EndedCause.WIN);
}
}