Added all the other GhostSystem Scripts
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DateSelector : MonoBehaviour
|
||||
{
|
||||
public int selectedYear;
|
||||
public int selectedMonth;
|
||||
public int selectedDay;
|
||||
public int selectedHour;
|
||||
public int selectedMinute;
|
||||
|
||||
public void SetYear(int yearIndex)
|
||||
{
|
||||
selectedYear = yearIndex; // Achtung: ggf. +Offset je nach Dropdown-Inhalt
|
||||
}
|
||||
|
||||
public void SetMonth(int monthIndex)
|
||||
{
|
||||
selectedMonth = monthIndex + 1; // Januar = 0 in Dropdown → Monat = 1
|
||||
}
|
||||
|
||||
public void SetDay(int dayIndex)
|
||||
{
|
||||
selectedDay = dayIndex + 1; // 1–31
|
||||
}
|
||||
|
||||
public void SetHour(int hourIndex)
|
||||
{
|
||||
selectedHour = hourIndex; // 0–23
|
||||
}
|
||||
|
||||
public void SetMinute(int minuteIndex)
|
||||
{
|
||||
selectedMinute = minuteIndex; // 0–59
|
||||
}
|
||||
public DateTime selectedDateTime()
|
||||
{
|
||||
DateTime dateAndTime = new DateTime(selectedYear, selectedMonth, selectedDay, selectedHour, selectedMinute, 0, DateTimeKind.Utc);
|
||||
return dateAndTime;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user