2025-06-04 22:49:37 +08:00
|
|
|
|
/*
|
|
|
|
|
* @author Valentin Simonov / http://va.lent.in/
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using TouchScript.Layers;
|
|
|
|
|
using TouchScript.Pointers;
|
|
|
|
|
using TouchScript.InputSources;
|
|
|
|
|
|
|
|
|
|
namespace TouchScript.Examples.Cube
|
|
|
|
|
{
|
|
|
|
|
/// <exclude />
|
|
|
|
|
public class LayerDelegate : MonoBehaviour, ILayerDelegate
|
|
|
|
|
{
|
|
|
|
|
public RedirectInput Source;
|
|
|
|
|
public TouchLayer RenderTextureLayer;
|
|
|
|
|
|
|
|
|
|
public bool ShouldReceivePointer(TouchLayer layer, IPointer pointer)
|
|
|
|
|
{
|
|
|
|
|
if (layer == RenderTextureLayer)
|
2025-08-24 18:59:40 +08:00
|
|
|
|
return pointer.InputSource == (IInputSource) Source;
|
|
|
|
|
return pointer.InputSource != (IInputSource) Source;
|
2025-06-04 22:49:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2025-08-24 18:59:40 +08:00
|
|
|
|
}
|