Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class text : MonoBehaviour {
- public float m_speed = 10;
- public float m_liveTime = 1;
- public float m_power = 1.0f;
- protected Transform m_transform;
- void Start() {
- m_transform = this.transform;
- }
- void Update() {
- m_liveTime -= Time.deltaTime;
- if(m_liveTime <= 0)
- {
- Destory(this.gameObject);
- }
- m_transform.Translate(new Vector3(0, 0, -m_speed * Time.deltaTime));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement