private IEnumerator GameEnd()
    {
        Lenin.PlayMessage("GameEnd");
        yield return(new WaitForSeconds(endGameWait));

        GameManager.AddProgress();
        LevelLoader.LoadLevel(nextLevel);
    }
 void Awake()
 {
     instance = this;
     if (LevelLoader.isLevelLoaded)
     {
         OnLevelLoaded();
     }
     else
     {
         LevelLoader.onLevelLoaded += OnLevelLoaded;
     }
 }
Esempio n. 3
0
 public override void OnDragDrop(IDragSource source)
 {
     if (source is GPDragSource && (source as GPDragSource).sourceType == index.ToString())
     {
         index++;
         animator.SetInteger("Action", index);
         Lenin.TryPlayMessage("GoodQueue");
     }
     else
     {
         Lenin.TryPlayMessage("WrongQueue");
     }
 }
 public override void OnDragDrop(IDragSource source)
 {
     if (isUsed)
     {
         return;
     }
     if (source is GPDragSource && (source as GPDragSource).sourceType == targetType)
     {
         isUsed = true;
         onView.SetActive(true);
         offView.SetActive(false);
         (source as GPDragSource).Used();
         Lenin.TryPlayMessage("GoodPlace");
     }
     else
     {
         Lenin.TryPlayMessage("WrongPlace");
     }
 }
 void OnDestroy()
 {
     instance = null;
     LevelLoader.onLevelLoaded -= OnLevelLoaded;
 }