Scriptum/Assets/Scripts/REFACTORING/Application/Mission/Condition/Subject/KillRequiredSubject.cs

42 lines
1.3 KiB
C#
Raw Permalink Normal View History

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