private void OnCollisionEnter2D(Collision2D collision) { if (CurrentBoomerang.Mode == Boomerang.BoomerangModes.TRAVEL) { CurrentBoomerang.Collided(true); } }
// Start is called before the first frame update void Start() { NormalRang = new NormalBoomerang(this); FireRang = new FireBoomerang(this); IceRang = new IceBoomerang(this); ShockRang = new ShockBoomerang(this); WindRang = new WindBoomerang(this); ObsidianRang = new ObsidianBoomerang(this); CurrentBoomerang = NormalRang; CurrentBoomerang.SetColor(CurrentBoomerang.BoomerangColor); Debug.Log(CurrentBoomerang.Type); }
void FixedUpdate() { CurrentBoomerang.HandleBoomerang(); }