Reworked the dialogue system

Now the dialogue can use tags to add special effects
Reorganized project structure, updating may require adding some using statements
This commit is contained in:
Gerard Gascón 2022-09-15 17:27:28 +02:00 committed by GitHub
parent 95bad523b9
commit 0e8b8b1835
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 1912 additions and 1266 deletions

View file

@ -1,38 +1,40 @@
using UnityEngine;
using Cinemachine;
public class CMCameraTrigger : MonoBehaviour{
namespace SimpleTools.Cinemachine {
public class CMCameraTrigger : MonoBehaviour {
CinemachineVirtualCamera vcam;
CinemachineVirtualCamera vcam;
void Awake(){
vcam = GetComponentInChildren<CinemachineVirtualCamera>(true);
vcam.gameObject.SetActive(false);
}
void Awake() {
vcam = GetComponentInChildren<CinemachineVirtualCamera>(true);
vcam.gameObject.SetActive(false);
}
#region 3D
void OnTriggerEnter(Collider col){
if (col.CompareTag("Player")){
vcam.gameObject.SetActive(true);
}
}
void OnTriggerExit(Collider col){
if (col.CompareTag("Player")){
vcam.gameObject.SetActive(true);
}
}
#endregion
#region 3D
void OnTriggerEnter(Collider col) {
if (col.CompareTag("Player")) {
vcam.gameObject.SetActive(true);
}
}
void OnTriggerExit(Collider col) {
if (col.CompareTag("Player")) {
vcam.gameObject.SetActive(true);
}
}
#endregion
#region 2D
void OnTriggerEnter2D(Collider2D col){
if (col.CompareTag("Player")){
vcam.gameObject.SetActive(true);
}
}
void OnTriggerExit2D(Collider2D col){
if (col.CompareTag("Player")){
vcam.gameObject.SetActive(false);
}
}
#endregion
}
#region 2D
void OnTriggerEnter2D(Collider2D col) {
if (col.CompareTag("Player")) {
vcam.gameObject.SetActive(true);
}
}
void OnTriggerExit2D(Collider2D col) {
if (col.CompareTag("Player")) {
vcam.gameObject.SetActive(false);
}
}
#endregion
}
}