skybox subsetter
This commit is contained in:
32
Assets/Skybox Blender/Demos/SpacebarClick.cs
Normal file
32
Assets/Skybox Blender/Demos/SpacebarClick.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace SkyboxBlenderSpace
|
||||
{
|
||||
public class SpacebarClick : MonoBehaviour
|
||||
{
|
||||
public SkyboxBlender skyboxScript;
|
||||
bool isStopped;
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Keyboard.current.spaceKey.wasPressedThisFrame) {
|
||||
skyboxScript.Blend();
|
||||
isStopped = false;
|
||||
}
|
||||
|
||||
// stop blending
|
||||
if (Keyboard.current.eKey.wasPressedThisFrame) {
|
||||
if (isStopped) {
|
||||
skyboxScript.Resume();
|
||||
isStopped = false;
|
||||
}
|
||||
else {
|
||||
skyboxScript.Stop();
|
||||
isStopped = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user