Intro cinematic implementation and Apple Hills map

This commit is contained in:
2025-09-09 13:11:18 +02:00
parent c83bd5633b
commit ed093c3ddd
289 changed files with 27232 additions and 21829 deletions

View File

@@ -0,0 +1,49 @@
using UnityEngine;
using UnityEngine.Playables;
public class IntroCinematicsPlayer : MonoBehaviour
{
public bool ShouldPlayIntro;
public GameObject introsequence;
private PlayableDirector director;
void OnEnable()
{
// Get the director and subscribe to when it stops playing
director = GetComponent<PlayableDirector>();
director.stopped += OnPlayableDirectorStopped;
}
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
//Play the intro and unhide the Canvas object if intro is enabled
if (ShouldPlayIntro)
{
introsequence.SetActive(true);
director.Play();
}
;
//Disable the intro Canvas object if intro is disabled
if (!ShouldPlayIntro)
{
introsequence.SetActive(false);
}
;
}
void OnPlayableDirectorStopped(PlayableDirector aDirector)
{
// Disable the introsequence gameobject when intro is finished playing
introsequence.SetActive(false);
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c119ffb87b2a16d4f925ff5d5ffd7092