Initial commit

This commit is contained in:
Ardella Malinda Sarastri
2025-07-10 17:06:42 +07:00
commit 72b8b42a0b
8149 changed files with 4223394 additions and 0 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);
}
});
}
}