public void Die() { dissolve.StartDissolve(); Destroy(gameObject, 1.1f); Destroy(gun); //isDead = true; }
void StartDissolve() { float random = Random.Range(10.0f, 100.0f); dissolve.StartDissolve(random); arrowDissolve.StartDissolve(random); }
void OnHit() { if (wasHit == true) { return; } dissolve.StartDissolve(); wasHit = true; }
public void AddScoredObject(GameObject aScoredObject) { myScoredObjects.Add(aScoredObject); if (myScoredObjects.Count >= myMaxScoredObjects) { Dissolve dissolve = myScoredObjects[0].GetComponent <Dissolve>(); if (dissolve != null) { dissolve.StartDissolve(); myScoredObjects.Remove(dissolve.gameObject); } } }
void Die() { //sprite.enabled = false; coll.enabled = false; if (isFlipped) { Flip(); } dissolve.StartDissolve(); //particle.Play(); Destroy(gameObject, 1.1f); Destroy(gun); isDead = true; enemyCount -= 1; }
public void Recreate() { dissolve.StartDissolve(1, 0, iTween.EaseType.easeInBack); dissolve.DestroyOnComplete(false); }