implementation of drecon in unity 2022 lts
forked from:
https://github.com/joanllobera/marathon-envs
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
482 B
24 lines
482 B
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);
|
|
}
|
|
}
|
|
|