Пример #1
0
 public void Kill()
 {
     oscar.IsRunning = false;
     oscar.Animator.SetBool(Oscar.AnimIsDead, true);
     Object.Destroy(oscar.GetComponent <Collider2D> ());
     Camera.main.transform.SetParent(null);
     oscar.GetComponent <SpriteRenderer> ().material.DOFade(0f, killDuration);
     LivesManager.Instance.RemoveOneLife();
     oscar.transform.DOMove(new Vector3(oscar.transform.position.x, oscar.transform.position.y + killHeight), killDuration)
     .OnComplete(LevelManager.ReloadCurrent);
 }