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