private void CheckMatch() { if (currentBug.bugColor == targetColor) { BugUtils.PaintBugOccur(); readyToPaint = false; LinearMove movementCtrl = currentBug.gameObject.AddComponent <LinearMove>(); movementCtrl.Init(true, 5); } }
private void Dead() { if (deathEffect != null) { GameObject effectObj = Instantiate(deathEffect, transform.position, Quaternion.identity); UpdateParticleColor(effectObj); } BugUtils.KillBugOccur(); Destroy(gameObject); }