First commit for private source control. Older commits available on Github.

This commit is contained in:
2026-03-26 12:52:52 +00:00
parent a04c602626
commit 2d449c4a17
2176 changed files with 408185 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using UnityEngine.Events;
namespace PrimeTweenDemo {
// p0 todo replace with AnimateOnClick and serialize TweenAnimation instead? no, because I need to reference all animations from one place to animate them all
// p0 todo create Demo Pro. With which version of Unity?
public class OnClick : MonoBehaviour {
[SerializeField] public UnityEvent onClick = new UnityEvent();
void Update() {
if (InputController.GetDown()) {
Vector2 screenPos = InputController.screenPosition;
var ray = Camera.main.ScreenPointToRay(screenPos);
if (Physics.Raycast(ray, out var hit) && IsChild(hit.transform, transform)) {
// Debug.Log("onClick", this);
onClick.Invoke();
}
}
}
static bool IsChild(Transform t, Transform other) {
Transform parent = t.parent;
while (parent != null) {
if (parent == other) {
return true;
}
parent = parent.parent;
}
return false;
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 26e5afea6b0e469b8f640089915afdd2
timeCreated: 1755085967
AssetOrigin:
serializedVersion: 1
productId: 252960
packageName: "PrimeTween \xB7 High-Performance Animations and Sequences"
packageVersion: 1.3.7
assetPath: Assets/Plugins/PrimeTween/Demo/Scripts/Pro/OnClick.cs
uploadId: 837278