-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSet_Time.cs
38 lines (34 loc) · 1023 Bytes
/
Set_Time.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
namespace GameCreator.Core
{
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
[AddComponentMenu("")]
public class Set_Time : IAction
{
public int hour = 7;
public int minute = 0;
public int year = 2020;
// public int day_of_year = 125;
public int month = 3;
public int day = 5;
private DateTime thedate;
private int day_of_year;
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
thedate = new DateTime(year, month, day);
day_of_year = thedate.DayOfYear;
//Debug.Log (thedate.ToString);
//Debug.Log (day_of_year.ToString);
Debug.Log (day_of_year);
EnviroSkyMgr.instance.ChangeSeason(EnviroSeasons.Seasons.Spring);
EnviroSkyMgr.instance.SetTime(year,day_of_year,hour,minute,0);
return true;
}
#if UNITY_EDITOR
public static new string NAME = "Custom/Set_Time";
#endif
}
}