Commit 9b4c9898 authored by Manuel Buß's avatar Manuel Buß
Browse files

nice to have

parent 843563a6
......@@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 7076633765201108699}
- component: {fileID: 7986366262906127875}
- component: {fileID: 3930011882176210989}
- component: {fileID: 1184696261440392652}
m_Layer: 11
m_Name: Ball
m_TagString: Ball
......@@ -132,3 +133,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
maxVelocity: 10
--- !u!114 &1184696261440392652
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1497791176711212348}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c50362b0a37326a4590670d599a49109, type: 3}
m_Name:
m_EditorClassIdentifier:
angularVelocity: 1.57
This diff is collapsed.
using UnityEngine;
public class Rotate : MonoBehaviour
{
[SerializeField] private float angularVelocity;
private float angle;
private void FixedUpdate()
{
angle += angularVelocity * Time.fixedDeltaTime;
transform.rotation = Quaternion.AngleAxis(Mathf.Rad2Deg*angle,Vector3.forward);
}
}
fileFormatVersion: 2
guid: c50362b0a37326a4590670d599a49109
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class IngameUIActions : MonoBehaviour
{
[SerializeField] private RectTransform panel;
private bool paused = false;
private void Start()
{
Time.timeScale = 1;
}
private void Update()
{
if (Input.GetButtonDown("Cancel"))
{
paused = !paused;
}
Time.timeScale = paused ? 0:1;
panel.gameObject.SetActive(paused);
}
public void Continue()
{
paused = false;
}
public void ShowMenu()
{
SceneManager.LoadScene("Menu");
}
}
fileFormatVersion: 2
guid: da3822e8e15ec6f42b260093810e16f0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment