Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class AlienBulletScript : MonoBehaviour
- {
- //prędkość pocisku
- public float speed = 6f;
- void Start()
- {
- //Ustawienie po jakim czasie ma zostać usunięty ten pocisk
- Destroy(gameObject, 3);
- }
- void Update()
- {
- Move();
- }
- void Move()
- {
- //poruszanie sie w dół, czyli po osi Y
- transform.position += Vector3.down * speed * Time.deltaTime;
- }
- }
Add Comment
Please, Sign In to add comment