generated from DevPlus1/Unity-Customer-Template
Added Game Files
This commit is contained in:
parent
ed87277ef8
commit
e1a8060711
49 changed files with 5771 additions and 0 deletions
30
Assets/Scripts/SimpleBall.cs
Normal file
30
Assets/Scripts/SimpleBall.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace CrimsofallTechnologies.SimpleBall {
|
||||
public class SimpleBall : MonoBehaviour
|
||||
{
|
||||
public MeshRenderer mRenderer;
|
||||
public float rotationSpeed = 10f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if(mRenderer != null)
|
||||
{
|
||||
mRenderer.material.color = Random.ColorHSV();
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
transform.Rotate(Vector3.up, rotationSpeed * Time.deltaTime);
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
{
|
||||
if(mRenderer != null)
|
||||
{
|
||||
mRenderer.material.color = Random.ColorHSV();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/SimpleBall.cs.meta
Normal file
2
Assets/Scripts/SimpleBall.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5665a73efe30f3e44b78ff09527407a2
|
||||
Loading…
Add table
Add a link
Reference in a new issue