titled added
This commit is contained in:
@@ -63,6 +63,7 @@ public class BodyManager : MonoBehaviour
|
||||
|
||||
IEnumerator Spawn()
|
||||
{
|
||||
// 0.75, 1.25f <remove realtime for recording>
|
||||
yield return new WaitForSecondsRealtime(Random.Range(1f, 2.5f));
|
||||
m_Pool.Get();
|
||||
StartCoroutine(Spawn());
|
||||
|
||||
24
Assets/8_Scripts/2_General/TitleSpawn.cs
Normal file
24
Assets/8_Scripts/2_General/TitleSpawn.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TitleSpawn : MonoBehaviour
|
||||
{
|
||||
|
||||
public float m_Offset;
|
||||
|
||||
public float m_Speed;
|
||||
|
||||
private float m_Sine = 0;
|
||||
|
||||
private Vector3 m_InitialPosition;
|
||||
|
||||
void Start(){
|
||||
m_InitialPosition = this.transform.position;
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
m_Sine += m_Speed;
|
||||
this.transform.position = new Vector3(Mathf.Sin(m_Sine) * m_Offset, m_InitialPosition.y, m_InitialPosition.z);
|
||||
}
|
||||
}
|
||||
11
Assets/8_Scripts/2_General/TitleSpawn.cs.meta
generated
Normal file
11
Assets/8_Scripts/2_General/TitleSpawn.cs.meta
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 536a00ffa8633f544a4750fbf160a0c7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user