mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Demo
Demo
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
public class BhvApplicationQuit : MonoBehaviour
|
||||
{
|
||||
private void Awake()
|
||||
{
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
}
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
YooAssets.Destroy();
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3cbcea01819f3d94ba5162624ad9c75f
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class BhvBackgroundScroller : MonoBehaviour
|
||||
{
|
||||
public float ScrollSpeed;
|
||||
public float TileSizeZ;
|
||||
|
||||
private Vector3 _startPosition;
|
||||
|
||||
void Start ()
|
||||
{
|
||||
_startPosition = transform.position;
|
||||
}
|
||||
|
||||
void Update ()
|
||||
{
|
||||
float newPosition = Mathf.Repeat(Time.time * ScrollSpeed, TileSizeZ);
|
||||
this.transform.position = _startPosition + Vector3.forward * newPosition;
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 814f6a7e3ec8a40aaa3a2057e2695924
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user