init
This commit is contained in:
commit
341a877b4a
2338 changed files with 1346408 additions and 0 deletions
43
Assets/Scripts/FakeShop/FakeShopSeller.cs
Normal file
43
Assets/Scripts/FakeShop/FakeShopSeller.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class FakeShopSeller : MonoBehaviour{
|
||||
|
||||
[SerializeField] GameObject sellerText = default;
|
||||
[SerializeField] TMP_Animated text = default;
|
||||
[SerializeField] Dialogue dialogue = default;
|
||||
[SerializeField] GameObject arrow = default;
|
||||
|
||||
void Awake(){
|
||||
arrow.SetActive(false);
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider col){
|
||||
if (col.CompareTag("Player")){
|
||||
arrow.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerStay(Collider col){
|
||||
if (col.CompareTag("Player")){
|
||||
if(Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0)){
|
||||
Time.timeScale = 0;
|
||||
sellerText.SetActive(true);
|
||||
text.ClearText();
|
||||
text.ReadText(dialogue.sentences[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerExit(Collider col){
|
||||
if (col.CompareTag("Player")){
|
||||
arrow.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndConversation(){
|
||||
Time.timeScale = 1;
|
||||
}
|
||||
}
|
11
Assets/Scripts/FakeShop/FakeShopSeller.cs.meta
Normal file
11
Assets/Scripts/FakeShop/FakeShopSeller.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3b9c58005cce9bf4d8529acbe07ef993
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue