Changed to 3D graphics, Adapted House and Chest

This commit is contained in:
TAASONI3
2023-04-27 23:12:11 +02:00
parent c32e634c02
commit 6dc7063cec
124 changed files with 8553 additions and 5097 deletions

29
Assets/Scripts/Sun.cs Normal file
View File

@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Sun : MonoBehaviour
{
// Assuming 60fps, have to reduce tickspeed of the sun
int counter = 0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
counter++;
if(counter >= 60){
counter = 0;
//0.01f/s / 180f = 18000s -> 300m -> 5h ()
gameObject.transform.eulerAngles = new Vector3(gameObject.transform.eulerAngles.x+0.01f,gameObject.transform.eulerAngles.y,gameObject.transform.eulerAngles.z);
//Reset rotation to 0
if(gameObject.transform.eulerAngles.x >= 360){
gameObject.transform.eulerAngles = new Vector3(0,gameObject.transform.eulerAngles.y,gameObject.transform.eulerAngles.z);
}
}
}
}