Base mechanics done
This commit is contained in:
		
							parent
							
								
									e4cc23e7f0
								
							
						
					
					
						commit
						eaa8cdd462
					
				
					 67 changed files with 21667 additions and 330 deletions
				
			
		| 
						 | 
				
			
			@ -1,12 +1,9 @@
 | 
			
		|||
using UnityEngine;
 | 
			
		||||
 | 
			
		||||
namespace Level4 {
 | 
			
		||||
    public class Bullet4 : MonoBehaviour {
 | 
			
		||||
        [SerializeField] float speed;
 | 
			
		||||
 | 
			
		||||
    public class Bullet4 : BulletStats {
 | 
			
		||||
        public void AddForce(int direction) {
 | 
			
		||||
            Rigidbody2D rb = GetComponent<Rigidbody2D>();
 | 
			
		||||
            rb.velocity = Vector2.right * direction * speed;
 | 
			
		||||
            GetComponent<Rigidbody2D>().velocity = Vector2.right * direction * bulletSpeed;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        void OnCollisionEnter2D(Collision2D other) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue