mirror of
https://github.com/game-ci/unity-test-runner.git
synced 2026-01-29 06:20:07 +08:00
Add some component tests to reference unity project (#86)
* Add some component tests to reference unity project * Use action/setup-node@v2 to avoid problems with build
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SampleComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Counter = new BasicCounter(5);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Counter.Increment();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7a5f63b9ea4b465194653c4d681faf42
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class TimerComponent : MonoBehaviour
|
||||
{
|
||||
public BasicCounter Counter = new BasicCounter();
|
||||
public float Timer = 1f;
|
||||
|
||||
void Update()
|
||||
{
|
||||
Timer -= Time.deltaTime;
|
||||
|
||||
if (Timer > 0)
|
||||
return;
|
||||
|
||||
Counter.Increment();
|
||||
Timer = 1f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b668d68a45bb48108ccda73269e3da7b
|
||||
timeCreated: 1610056748
|
||||
Reference in New Issue
Block a user