28 lines
724 B
C#
28 lines
724 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
public class ChapterPortal : MonoBehaviour
|
||
|
|
{
|
||
|
|
public GameObject go_nextchapter; // 다음 챕터 포탈 활성화
|
||
|
|
public Transform tf_chapterboss;
|
||
|
|
|
||
|
|
public void Set_NextChapter(bool active)
|
||
|
|
{
|
||
|
|
go_nextchapter.SetActive(active);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void OnTriggerEnter(Collider other)
|
||
|
|
{
|
||
|
|
var pcactor = other.GetComponent<PCActor>();
|
||
|
|
if(pcactor && !pcactor.IsEnemy())
|
||
|
|
{
|
||
|
|
if (go_nextchapter.activeSelf)
|
||
|
|
{ // 다음 챕터로
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{ // 보스를 처치하세요.
|
||
|
|
ToastUI.Ins.Set(349);
|
||
|
|
MyValue.m_RealCamera.Set_TargetShow(tf_chapterboss);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|