This commit is contained in:
2025-05-13 05:18:03 +03:00
parent 0790b782f2
commit 2ca246b75c
1494 changed files with 22057 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
using UnityEngine;
using System.Collections;
public class Button1 : MonoBehaviour, Predicate {
private Vector3 startPosition;
public float logicLevel = 0.05f;
private bool pressed = false;
public bool Automatic = true;
void Start () {
startPosition = transform.position;
}
public bool Pressed{
get{return pressed;}
set{pressed = value;}
}
public bool State(){
return pressed;
}
void Update () {
}
void FixedUpdate(){
if (Automatic) {
pressed = Vector3.Distance(startPosition, transform.position) > logicLevel;
}
//Debug.Log ("Is pressed = " + pressed);
}
}