mirror of
https://github.com/Ratstail91/Mementos.git
synced 2025-11-29 10:34:27 +11:00
Committed everything
This commit is contained in:
20
Unity/Alternate Genre Jam/Assets/Scripts/Clickable.cs
Normal file
20
Unity/Alternate Genre Jam/Assets/Scripts/Clickable.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Clickable : MonoBehaviour {
|
||||
public string inkFilename;
|
||||
|
||||
void OnMouseDown() {
|
||||
TextAsset asset;
|
||||
asset = Resources.Load<TextAsset>("Story/" + inkFilename);
|
||||
|
||||
if (asset == null) {
|
||||
Debug.LogError("Asset file is null");
|
||||
return;
|
||||
}
|
||||
|
||||
StoryController controller = FindObjectsOfType<StoryController>()[0];
|
||||
controller.PushInkAsset(asset);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user