mirror of
https://github.com/Ratstail91/Mementos.git
synced 2025-11-29 02:24:28 +11:00
21 lines
444 B
C#
21 lines
444 B
C#
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);
|
|
}
|
|
}
|