Skip to content
Snippets Groups Projects
Commit c4009a25 authored by Meike Wienholt's avatar Meike Wienholt
Browse files

Kommentare zu manchen Skripten hinzugefügt

parent 90c189ad
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,10 @@ public class Ori : MonoBehaviour
void OriAsItem()
{
/*code is only used in the animal level. It is based on Lisas and mine work around of the whole Entity-Item
problem we had. So that is the reason why we have Ori marked here as an item. The if-statement checks
if we, as a player, aquired Ori the Item. If yes it will delete ori from our inventory and spawn another ori
*/
if (Database.core.items[SupportFunctions.core.findItemIndexById(407)].acquired)
{
Database.core.items[SupportFunctions.core.findItemIndexById(407)].acquired = false;
......
......@@ -8,10 +8,8 @@ public class SpaceTagAnzeigen : MonoBehaviour
// Update is called once per frame
void Update()
{
Debug.Log("Space!");
if (Input.GetKey("space"))
{
Debug.Log("Space wurde gedrückt!");
for (int i = 0; i <= this.gameObject.transform.childCount; i++)
{
this.gameObject.transform.GetChild(i).gameObject.SetActive(true);
......
......@@ -21,6 +21,9 @@ public class StartStreamVideo : MonoBehaviour
void checkIf ()
{
/* If-Statement that is activated when the chosen Stage is activated. This is also a code we need to
re-work to get more universal
*/
if (Database.core.entities[SupportFunctions.core.findEntityIndexById(501)].entityStageId == 28)
{
Video.SetActive(true);
......
......@@ -6,6 +6,15 @@ using UnityEngine.Video;
using UnityEngine.SceneManagement;
public class StreamVideo : MonoBehaviour
{
/*@param rawImage --> chosen scene or point in the frame where the video should be displayed
@param videoPlayer --> chosen GameObject which has the videoplayer attached to it
@param audioSource --> Important so the audio will be played during the video. If not set there won't be
any audio besides the background music. This is because the Point and Click asset runs its own audio source
which is only build when the player starts the game.
@param return. Shall the player be able to return to the start screen? Just a normal bool variable. Nothing fancy
@param LevelToLoadAfterClick because the SceneManager is searching for the specific scene in the "builder" of the game
in Unity it is important to use a string and the correct way how it was written in Unity.
*/
public RawImage rawImage;
public VideoPlayer videoPlayer;
public AudioSource audioSource;
......@@ -20,12 +29,14 @@ public class StreamVideo : MonoBehaviour
void Update()
{
/* This statement makes it possible for the player/developer to skip the credit scene and also other
short videos in the game
*/
if (Input.anyKeyDown)
{
videoPlayer.Stop();
videoPlayer.gameObject.SetActive(false);
rawImage.gameObject.SetActive(false);
//ambient.Play();
if (Return)
{
SceneManager.LoadScene(LevelToLoadAfterClick); ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment