Example #1
0
 public IEnumerator DoDialog(string txt, Texture2D left, Texture2D right)
 {
     //Debug.Log("begin dialog");
     RpgDialog.Show(txt, left, right);
     while (!RpgDialog.Finished)
     {
         yield return(null);
     }
     //Debug.Log("end dialog");
 }
Example #2
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (bossStage == 0 && collision.CompareTag(Tags.PLAYER))
     {
         bossStage        = 1;
         dialog           = gameObject.AddComponent <RpgDialog>();
         dialog.onFinish += FinishDialog;
         dialog.Activate(TextManager.GetText("nightbar_boss_text"), bossName, bossTextGO);
         AudioManager.GetInstance().StopAllMusic();
         target.GetComponent <PlatformerMovement2D>().SetCanMove(false);
     }
 }
Example #3
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (bossStage == 0 && collision.gameObject.GetComponent <DamageReceiver>())
     {
         bossStage        = 1;
         lastBossTick     = Time.time;
         dialog           = gameObject.AddComponent <RpgDialog>();
         dialog.onFinish += () => { bossStage++; };
         dialog.Activate(TextManager.GetText("peter_boss_text"), TextManager.GetText("peter_boss_name"), bossTextGO);
         GameState.GetInstance().isCameraLocked = true;
         platform.GetComponent <MoveVertically>().enabled = true;
         target.GetComponent <PlatformerMovement2D>().SetCanMove(false);
     }
 }
Example #4
0
 private void Awake()
 {
     target           = ObjectLocator.GetPlayer();
     dialog           = gameObject.AddComponent <RpgDialog>();
     dialog.onFinish += FinishDialog;
 }