public void CheckOutsourceDueDate() { foreach (ContractData ContractData in WorkStructure.instance.GetOutSourceWorkList()) { print("CheckOutsourceDueDate -> " + ContractData.workID); if (ContractData.dueDate.week == GameTimeStructure.instance.GetGameTimeStructure().week && ContractData.dueDate.month == GameTimeStructure.instance.GetGameTimeStructure().month && ContractData.dueDate.year == GameTimeStructure.instance.GetGameTimeStructure().year) { print("DueDate -> " + ContractData.workID); if (ContractData.isDone) { ContractData.ClaimReward(); } else { ContractData.Fine(); } } } }
private void ClaimReward() { contractData.ClaimReward(); Destroy(this.gameObject); }