Scriptum/Assets/Scripts/REFACTORING/Application/Mission/Condition/Subject/KillRequiredSubject.cs
2023-01-03 22:44:24 +01:00

42 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
[Serializable]
public class KillRequiredSubject : RequiredSubject // Enemy - WTF is this class...
{
protected override string MODEL_LOCALIZATION => "Enemies/";
[SerializeField]
public int CurrentAmount;
public KillRequiredSubject(RequiredSubject requiredSubject) : base(requiredSubject.RequiredAmount, requiredSubject.RequiredObject) { }
public KillRequiredSubject(int requiredAmount, GameObject enemy, int currentAmount) : base(requiredAmount, enemy) { CurrentAmount = currentAmount; }
public KillRequiredSubject(int requiredAmount, string enemyName, int currentAmount) : base(requiredAmount, enemyName) { CurrentAmount = currentAmount; }
public KillRequiredSubject(int requiredAmount, int currentAmount) : base(requiredAmount) { CurrentAmount = currentAmount; }
public void IncreaseAmount()
{
Debug.Log("IncreaseAmount");
CurrentAmount += 1;
Debug.Log("New Amount: " + CurrentAmount);
}
public void IncreaseAmount(int amount)
{
CurrentAmount += amount;
}
public override bool CheckCondition()
{
return CurrentAmount >= RequiredAmount;
}
}