summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Projectile/Projectile.cs
blob: 5250d049ae1960eae2b9599d86d781d677469fdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Projectile : MonoBehaviour
{

	public Box collider;

	public bool multiColliders;
	public List<Box> colliders; 

    public UnitController owner;

    public bool isActive;

	public Vector3 velocity; // 初始速度

	public float gravity;

	public bool towardDirection; // foward朝向运动的方向

	void OnEnable()
	{
		ColliderRegistry.Instance.AddProjectile(this);	
	}

	void Update()
	{

	}

	void OnDestroy()
	{
		ColliderRegistry.Instance.RemoveProjectile(this);
	}

}