HEAD
parent
63716fb326
commit
14d0ebdc17
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ccb5c6615fc7fa14c8122e18ff39d4e1
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 14f21d7a1e53a8c4e87b25526a7eb63c
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1466788345
|
||||||
|
licenseType: Store
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: aadad8ac54f29e44583510294ac5c312
|
||||||
|
timeCreated: 1466788355
|
||||||
|
licenseType: Store
|
||||||
|
TextScriptImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,76 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6a3c684705042f345975d924f6983e36
|
||||||
|
timeCreated: 1466788352
|
||||||
|
licenseType: Store
|
||||||
|
PluginImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
isPreloaded: 0
|
||||||
|
platformData:
|
||||||
|
Android:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
Any:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
Editor:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: AnyOS
|
||||||
|
Linux:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: x86
|
||||||
|
Linux64:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: x86_64
|
||||||
|
OSXIntel:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
OSXIntel64:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
SamsungTV:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
STV_MODEL: STANDARD_13
|
||||||
|
Tizen:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
WebGL:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
Win:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
Win64:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
WindowsStoreApps:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DontProcess: False
|
||||||
|
PlaceholderPath: Assets/JsonDotNet/Assemblies/Standalone/Newtonsoft.Json.dll
|
||||||
|
SDK: AnySDK
|
||||||
|
ScriptingBackend: Il2Cpp
|
||||||
|
iOS:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CompileFlags:
|
||||||
|
FrameworkDependencies:
|
||||||
|
tvOS:
|
||||||
|
enabled: 1
|
||||||
|
settings: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,75 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 17aef65a15b471f468b5fbeb4ff0c6a1
|
||||||
|
timeCreated: 1466788349
|
||||||
|
licenseType: Store
|
||||||
|
PluginImporter:
|
||||||
|
serializedVersion: 1
|
||||||
|
iconMap: {}
|
||||||
|
executionOrder: {}
|
||||||
|
isPreloaded: 0
|
||||||
|
platformData:
|
||||||
|
Android:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
Any:
|
||||||
|
enabled: 0
|
||||||
|
settings: {}
|
||||||
|
Editor:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DefaultValueInitialized: true
|
||||||
|
OS: AnyOS
|
||||||
|
Linux:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: x86
|
||||||
|
Linux64:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: x86_64
|
||||||
|
LinuxUniversal:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
OSXIntel:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
OSXIntel64:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
OSXUniversal:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
SamsungTV:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
STV_MODEL: STANDARD_13
|
||||||
|
Win:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
Win64:
|
||||||
|
enabled: 1
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
WindowsStoreApps:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CPU: AnyCPU
|
||||||
|
DontProcess: False
|
||||||
|
PlaceholderPath:
|
||||||
|
SDK: AnySDK
|
||||||
|
ScriptingBackend: Il2Cpp
|
||||||
|
iOS:
|
||||||
|
enabled: 0
|
||||||
|
settings:
|
||||||
|
CompileFlags:
|
||||||
|
FrameworkDependencies:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,159 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 87ac87713801eb7438f6a908ff3f968d
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 12
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 1
|
||||||
|
sRGBTexture: 1
|
||||||
|
linearTexture: 0
|
||||||
|
fadeOut: 0
|
||||||
|
borderMipMap: 0
|
||||||
|
mipMapsPreserveCoverage: 0
|
||||||
|
alphaTestReferenceValue: 0.5
|
||||||
|
mipMapFadeDistanceStart: 1
|
||||||
|
mipMapFadeDistanceEnd: 3
|
||||||
|
bumpmap:
|
||||||
|
convertToNormalMap: 0
|
||||||
|
externalNormalMap: 0
|
||||||
|
heightScale: 0.25
|
||||||
|
normalMapFilter: 0
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
ignoreMasterTextureLimit: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 0
|
||||||
|
wrapV: 0
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
spriteExtrude: 1
|
||||||
|
spriteMeshType: 1
|
||||||
|
alignment: 0
|
||||||
|
spritePivot: {x: 0.5, y: 0.5}
|
||||||
|
spritePixelsToUnits: 100
|
||||||
|
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
spriteGenerateFallbackPhysicsShape: 1
|
||||||
|
alphaUsage: 1
|
||||||
|
alphaIsTransparency: 0
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
cookieLightType: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Standalone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Server
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: Android
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: iPhone
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: WebGL
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 0
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
nameFileIdTable: {}
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7fe7a66ac7055ee4493b07d3811051e1
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,122 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Cinemachine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using DG.Tweening;
|
||||||
|
public class Canvas : MonoBehaviour
|
||||||
|
{
|
||||||
|
int questionAnswer=-1;
|
||||||
|
public GameObject mask;
|
||||||
|
public GameObject tip;
|
||||||
|
public GameObject toolBag;
|
||||||
|
public GameObject errorTip;
|
||||||
|
public GameObject step1_1;
|
||||||
|
public GameObject step1_2;
|
||||||
|
public GameObject step2_1;
|
||||||
|
public GameObject moveTip;
|
||||||
|
public GameObject person1;
|
||||||
|
public GameObject person2;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
EventManager.Instance.register("StartTip", StartTip);
|
||||||
|
EventManager.Instance.register("Step1_1", Step1_1);
|
||||||
|
EventManager.Instance.register("PanDuanSafe", SafeUIChange);
|
||||||
|
EventManager.Instance.register("SafeOperate", SafeOperate);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartTip(params object[] args) {
|
||||||
|
tip.SetActive(true);
|
||||||
|
}
|
||||||
|
void Step1_1(params object[] args) {
|
||||||
|
tip.SetActive(false);
|
||||||
|
toolBag.SetActive(true);
|
||||||
|
step1_1.SetActive(true);
|
||||||
|
}
|
||||||
|
public void Question(int value)
|
||||||
|
{
|
||||||
|
questionAnswer = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SunbmitOne() {
|
||||||
|
if (questionAnswer==0) {
|
||||||
|
Invoke("wait", 0.5f);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("当前操作有误,请重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void wait() {
|
||||||
|
toolBag.SetActive(false);
|
||||||
|
person1.SetActive(false);
|
||||||
|
step1_2.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void FinishOperate() {
|
||||||
|
if (GameObject.FindGameObjectsWithTag("ZAW").Length == 0)
|
||||||
|
{
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"),GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "2-清理周边环境";
|
||||||
|
step1_2.SetActive(false);
|
||||||
|
EduCoderTool.WebConnecter.Singleton.SendResultToWeb(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("当前环境还处于危险状态,请继续重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SafeUIChange(params object[] data) {
|
||||||
|
if ((bool)data[0])
|
||||||
|
{
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"), GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "1-确认现场环境安全";
|
||||||
|
if ((bool)data[1])
|
||||||
|
{
|
||||||
|
EduCoderTool.WebConnecter.Singleton.SendResultToWeb(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
step1_2.GetComponent<Step1_2>().SafeFinish();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("当前环境判断错误,请重新判断");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SafeOperate(params object[] data) {
|
||||||
|
if ((int)data[0] == 0) {
|
||||||
|
mask.SetActive(true);
|
||||||
|
mask.GetComponent<Image>().DOColor(new Color(0, 0, 0, 1), 1);
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("正在转移");
|
||||||
|
Invoke("CloseMask", 3);
|
||||||
|
step1_2.SetActive(false);
|
||||||
|
} else if ((int)data[0] == 1) {
|
||||||
|
step1_2.GetComponent<Step1_2>().Remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CloseMask() {
|
||||||
|
mask.GetComponent<Image>().DOColor(new Color(0, 0, 0, 0), 1);
|
||||||
|
mask.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class ErrorTip : MonoBehaviour
|
||||||
|
{
|
||||||
|
Text text;
|
||||||
|
Image img;
|
||||||
|
float time;//³ÖÐøÊ±³¤
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
text = GetComponentInChildren<Text>();
|
||||||
|
img = GetComponentInChildren<Image>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitThis(string content,float t=2f) {
|
||||||
|
text.text = content;
|
||||||
|
time = t;
|
||||||
|
Invoke("CloseTip", time);
|
||||||
|
}
|
||||||
|
void CloseTip() {
|
||||||
|
transform.parent.gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f3528ae9a4c8a1f4cbd88abfacd8ecb5
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,22 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class GreenMan : MonoBehaviour
|
||||||
|
{
|
||||||
|
Animator animator;
|
||||||
|
public Transform safePos;
|
||||||
|
public Transform unSafePos;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
animator=GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
public void SetPosBySafe(bool safe) {
|
||||||
|
transform.position = safe ? safePos.position : unSafePos.position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void E_GameEnd() {
|
||||||
|
EventManager.Instance.emit("GameEnd");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class Operate : MonoBehaviour
|
||||||
|
{
|
||||||
|
Text text;
|
||||||
|
public string str="";
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
text = GetComponent<Text>();
|
||||||
|
transform.SetParent(GameObject.FindWithTag("Grid").transform);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
text.text = str;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 802e6073d6cc2284287ab051e1780161
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,25 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class ToolTip : MonoBehaviour
|
||||||
|
{
|
||||||
|
Text text;
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
text = GetComponent<Text>();
|
||||||
|
//WaitClose();
|
||||||
|
Invoke("Close", 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaitClose()
|
||||||
|
{
|
||||||
|
text.DOColor(new Color(text.color.r, text.color.g, text.color.b, 0), 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Close()
|
||||||
|
{
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 016b90c6282d2a141aff605d40b2814e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,35 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class AniEnd : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Text yishi;
|
||||||
|
public GameObject yifu;
|
||||||
|
Animator animator;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
animator = GetComponent<Animator>();
|
||||||
|
}
|
||||||
|
public void E_HuhuanEnd()
|
||||||
|
{
|
||||||
|
EventManager.Instance.emit("NextAc");
|
||||||
|
yishi.text = "»èÃÔ";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void E_GuanchaEnd(){
|
||||||
|
//yifu.SetActive(false);
|
||||||
|
EventManager.Instance.emit("ActionTwoEnd");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void E_TuoyiEnd() {
|
||||||
|
EventManager.Instance.emit("guancha");
|
||||||
|
|
||||||
|
animator.SetTrigger("Guancha");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void E_GameEnd()
|
||||||
|
{
|
||||||
|
EduCoderTool.WebConnecter.Singleton.SendResultToWeb(true);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Cinemachine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
using DG.Tweening;
|
||||||
|
|
||||||
|
public class Canvas2 : MonoBehaviour
|
||||||
|
{
|
||||||
|
public AudioClip[] ac;
|
||||||
|
AudioSource audioSource;
|
||||||
|
public GameObject tip2;
|
||||||
|
public GameObject step2_1;
|
||||||
|
public GameObject step2_2;
|
||||||
|
public Animator animator;
|
||||||
|
public GameObject errorTip;
|
||||||
|
public GameObject step2_3;
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
audioSource = GetComponent<AudioSource>();
|
||||||
|
EventManager.Instance.register("NextAc", NextAc);
|
||||||
|
EventManager.Instance.register("ActionTwoEnd", ActionTwoEnd);
|
||||||
|
EventManager.Instance.register("guancha",Guancha);
|
||||||
|
tip2.SetActive(true);
|
||||||
|
Invoke("InitLevel2", 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void InitLevel2()
|
||||||
|
{
|
||||||
|
tip2.GetComponentInChildren<Tip>().str = "请选择正确的部位进行拍打询问";
|
||||||
|
tip2.SetActive(false);
|
||||||
|
step2_1.SetActive(true);
|
||||||
|
tip2.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Guancha(params object[] data) {
|
||||||
|
audioSource.clip = ac[1];
|
||||||
|
audioSource.Play();
|
||||||
|
}
|
||||||
|
public void ActionOne(bool inspect) {
|
||||||
|
if (inspect)
|
||||||
|
{
|
||||||
|
step2_1.SetActive(false);
|
||||||
|
audioSource.clip = ac[0];
|
||||||
|
audioSource.Play();
|
||||||
|
animator.SetTrigger("Huhuan");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
else {
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("当前拍打部位错误,请重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void NextAc(params object[] data) {
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"), GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "1-判断被救者有无意识";
|
||||||
|
tip2.GetComponentInChildren<Tip>().str = "请选择正确的部位进行观察";
|
||||||
|
tip2.SetActive(false);
|
||||||
|
tip2.SetActive(true);
|
||||||
|
step2_2.SetActive(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActionTwoEnd(params object[] data) {
|
||||||
|
step2_3.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ActionTwo(bool inspect)
|
||||||
|
{
|
||||||
|
if (inspect)
|
||||||
|
{
|
||||||
|
step2_2.SetActive(false);
|
||||||
|
animator.SetTrigger("Tuoyi");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("当前观察部位错误,请重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class Step2_3 : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Animator greenMan;
|
||||||
|
public Text State;
|
||||||
|
public static int rand;
|
||||||
|
int answer=-1;
|
||||||
|
public GameObject errorTip;
|
||||||
|
public GameObject tip;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
EventManager.Instance.register("Question2", Question2);
|
||||||
|
}
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
Obstacle();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"), GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "2-观察被救者部位";
|
||||||
|
}
|
||||||
|
|
||||||
|
void Obstacle()
|
||||||
|
{
|
||||||
|
Debug.Log("随机结果");
|
||||||
|
rand = 10;
|
||||||
|
rand = Random.RandomRange(0, 2);
|
||||||
|
if (rand == 0)
|
||||||
|
{
|
||||||
|
State.text = "正常";
|
||||||
|
}
|
||||||
|
else if (rand == 1)
|
||||||
|
{
|
||||||
|
State.text = "不正常";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Question2(params object[] data) {
|
||||||
|
answer = (int)data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PanDuan() {
|
||||||
|
if (rand == 0)
|
||||||
|
{
|
||||||
|
if (answer == 2)
|
||||||
|
{
|
||||||
|
greenMan.SetTrigger("Call");
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"), GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "3-请人拨打120";
|
||||||
|
tip.SetActive(false);
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("答案选择错误,请重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (rand == 1)
|
||||||
|
{
|
||||||
|
if (answer == 2)
|
||||||
|
{
|
||||||
|
greenMan.SetTrigger("Call");
|
||||||
|
GameObject obj = Instantiate(Resources.Load<GameObject>("operate"), GameObject.FindWithTag("Grid").transform);
|
||||||
|
obj.GetComponent<Operate>().str = "3-请人拨打120以及拿取AED";
|
||||||
|
tip.SetActive(false);
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
errorTip.SetActive(true);
|
||||||
|
errorTip.GetComponentInChildren<ErrorTip>().InitThis("答案选择错误,请重试");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using DG.Tweening;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
public class Tip : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float time;
|
||||||
|
[TextArea]
|
||||||
|
public string str;
|
||||||
|
Text myText;
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
myText = GetComponent<Text>();
|
||||||
|
}
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
myText.text = "";
|
||||||
|
myText.DOText(str, time);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue