Add metadata files for LeanTween assets and update existing prefab references

This commit is contained in:
2025-12-13 02:33:23 +01:00
parent 2381153dbe
commit 471cf45df3
463 changed files with 237904 additions and 73 deletions

View File

@@ -0,0 +1,56 @@
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using DentedPixel;
public class TestingSceneSwitching : MonoBehaviour {
public GameObject cube;
private static int sceneIter = 0;
private int tweenCompleteCnt;
// Use this for initialization
void Start () {
LeanTest.expected = 6;
// Start a couple of tweens and make sure they complete
tweenCompleteCnt = 0;
LeanTween.scale(cube, new Vector3(3f,3f,3f), 0.1f).setDelay(0.1f).setOnComplete( ()=>{
tweenCompleteCnt++;
});
LeanTween.move(cube, new Vector3(3f,3f,3f), 0.1f).setOnComplete( ()=>{
tweenCompleteCnt++;
});
LeanTween.delayedCall(cube, 0.1f, ()=>{
tweenCompleteCnt++;
});
// Schedule a couple of tweens, make sure some only half complete than switch scenes
LeanTween.delayedCall(cube, 1f, ()=>{
LeanTween.scale(cube, new Vector3(3f,3f,3f), 1f).setDelay(0.1f).setOnComplete( ()=>{
});
LeanTween.move(cube, new Vector3(3f,3f,3f), 1f).setOnComplete( ()=>{
});
});
// Load next scene
LeanTween.delayedCall(cube, 0.5f, ()=>{
LeanTest.expect( tweenCompleteCnt==3, "Scheduled tweens completed:"+sceneIter);
if(sceneIter<5){
sceneIter++;
SceneManager.LoadScene(0);
}
});
}
}