33 lines
793 B
C#
33 lines
793 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
|
||
|
public class FestiveMode : MonoBehaviour
|
||
|
{
|
||
|
public Button DefaultButton;
|
||
|
bool _birthday = false;
|
||
|
public Button BirthdayButton;
|
||
|
public AudioClip BirthdaySound;
|
||
|
|
||
|
private void Start()
|
||
|
{
|
||
|
var CurrentDate = System.DateTime.Now;
|
||
|
|
||
|
if (CurrentDate.Day == 24 && CurrentDate.Month == 1)
|
||
|
{
|
||
|
_birthday = true;
|
||
|
DefaultButton.gameObject.SetActive(false);
|
||
|
BirthdayButton.gameObject.SetActive(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void OnButtonClick()
|
||
|
{
|
||
|
if (_birthday)
|
||
|
{
|
||
|
AudioSource.PlayClipAtPoint(BirthdaySound, GameObject.FindObjectOfType<Camera>().transform.position, 0.1f);
|
||
|
}
|
||
|
}
|
||
|
}
|