53 lines
1,004 B
C#
53 lines
1,004 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class controlButtons : MonoBehaviour
|
|
{
|
|
public GameObject sun;
|
|
public GameObject moon;
|
|
public GameObject bunny;
|
|
public GameObject background;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void sunrise()
|
|
{
|
|
sun.GetComponent<sun>().rise();
|
|
background.GetComponent<background>().brighten();
|
|
}
|
|
|
|
public void sunset()
|
|
{
|
|
sun.GetComponent<sun>().set();
|
|
background.GetComponent<background>().darken();
|
|
}
|
|
|
|
public void toggleMoon()
|
|
{
|
|
moon.GetComponent<moon>().toggleMoon();
|
|
}
|
|
|
|
public void bunnyGoHop()
|
|
{
|
|
bunny.GetComponent<bunny>().hop();
|
|
}
|
|
|
|
public void goBack()
|
|
{
|
|
SceneManager.LoadScene("startScreen");
|
|
}
|
|
}
|