reset id function & modify prefab

master
tigerchen 6 years ago
parent 9281959b45
commit ba03bcdcaf
  1. 5
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Prefabs/RawImage.prefab
  2. 5
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity
  3. 7
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/movieController.cs
  4. 19
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs
  5. 7
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/ProjectSettings/EditorSettings.asset
  6. 28
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/ProjectSettings/ProjectSettings.asset
  7. 3
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/ProjectSettings/TagManager.asset

@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 2829506254029656376} - component: {fileID: 2829506254029656376}
m_Layer: 5 m_Layer: 5
m_Name: RawImage m_Name: RawImage
m_TagString: Untagged m_TagString: onFoot
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
@ -85,5 +85,6 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
totalTime: 0.5 totalTime: 0.5
id: 0 id: 0
stat: 0
tuio_event: {fileID: 0} tuio_event: {fileID: 0}
fade_speed: 0.02
stat: 0

@ -418,11 +418,6 @@ PrefabInstance:
propertyPath: tuio_event propertyPath: tuio_event
value: value:
objectReference: {fileID: 914806966} objectReference: {fileID: 914806966}
- target: {fileID: 2829506254029656376, guid: 8bbc036a3be21954681613cbe4f0e9a8,
type: 3}
propertyPath: fade_speed
value: 0.02
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8bbc036a3be21954681613cbe4f0e9a8, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8bbc036a3be21954681613cbe4f0e9a8, type: 3}
--- !u!224 &490275148 stripped --- !u!224 &490275148 stripped

@ -10,14 +10,11 @@ public class movieController : MonoBehaviour
public tuio_event tuio_event; public tuio_event tuio_event;
public float fade_speed = 0.02f; public float fade_speed = 0.02f;
public int stat; public int stat;
Vector2 final_size;
float c; float c;
Vector2 pos, pre_pos; Vector2 pos, pre_pos;
//public Transform trans;
// Start is called before the first frame update
void Start() void Start()
{ {
final_size = GetComponent<RectTransform>().sizeDelta;
GetComponent<RawImage>().color = Color.clear; GetComponent<RawImage>().color = Color.clear;
pos = Vector2.zero; pos = Vector2.zero;
} }
@ -40,7 +37,7 @@ public class movieController : MonoBehaviour
if (tuio_event.tuio_input.touchCount > 0) if (tuio_event.tuio_input.touchCount > 0)
{ {
transform.gameObject.SetActive(true); transform.gameObject.SetActive(true);
if (stat == 1) if (stat == 1 && id >= 0)
pos = tuio_event.tuio_input.GetTouch(id).position; pos = tuio_event.tuio_input.GetTouch(id).position;
else if (stat == 2) else if (stat == 2)
pos = pre_pos; pos = pre_pos;

@ -46,7 +46,7 @@ public class tuio_event : MonoBehaviour
{ {
GameObject g = Instantiate(img, canvas.GetComponent<Transform>()); GameObject g = Instantiate(img, canvas.GetComponent<Transform>());
g.name = _id.ToString(); g.name = _id.ToString();
g.GetComponent<movieController>().id = i; //g.GetComponent<movieController>().id = i;
} }
} }
} }
@ -59,12 +59,21 @@ public class tuio_event : MonoBehaviour
bool isExitTouch = !cur_ids.Contains(_id); bool isExitTouch = !cur_ids.Contains(_id);
if (isExitTouch) if (isExitTouch)
{ {
GameObject.Find(_id.ToString()).GetComponent<movieController>().stat = 2; //GameObject.Find(_id.ToString()).GetComponent<movieController>().stat = 2;
//Destroy(GameObject.Find(_id.ToString())); Destroy(GameObject.Find(_id.ToString()));
} }
} }
} }
//Vector2 pos = tuio_input.GetTouch(0).position; reset_id();
//img.GetComponent<RectTransform>().position = new Vector3(pos.x, pos.y, 0); }
void reset_id()
{
GameObject[] objs = GameObject.FindGameObjectsWithTag("onFoot");
Debug.Log(objs.Length);
for (int i = 0; i < objs.Length; i++)
{
objs[i].GetComponent<movieController>().id = i - 1;
}
} }
} }

@ -3,8 +3,8 @@
--- !u!159 &1 --- !u!159 &1
EditorSettings: EditorSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 8 serializedVersion: 7
m_ExternalVersionControlSupport: Hidden Meta Files m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2 m_SerializationMode: 2
m_LineEndingsForNewScripts: 2 m_LineEndingsForNewScripts: 2
m_DefaultBehaviorMode: 0 m_DefaultBehaviorMode: 0
@ -20,7 +20,4 @@ EditorSettings:
m_ProjectGenerationRootNamespace: m_ProjectGenerationRootNamespace:
m_CollabEditorSettings: m_CollabEditorSettings:
inProgressEnabled: 1 inProgressEnabled: 1
m_EnableTextureStreamingInEditMode: 1
m_EnableTextureStreamingInPlayMode: 1 m_EnableTextureStreamingInPlayMode: 1
m_AsyncShaderCompilation: 1
m_ShowLightmapResolutionOverlay: 1

@ -65,7 +65,6 @@ PlayerSettings:
disableDepthAndStencilBuffers: 0 disableDepthAndStencilBuffers: 0
androidStartInFullscreen: 1 androidStartInFullscreen: 1
androidRenderOutsideSafeArea: 1 androidRenderOutsideSafeArea: 1
androidUseSwappy: 0
androidBlitType: 0 androidBlitType: 0
defaultIsNativeResolution: 1 defaultIsNativeResolution: 1
macRetinaSupport: 1 macRetinaSupport: 1
@ -80,7 +79,6 @@ PlayerSettings:
usePlayerLog: 1 usePlayerLog: 1
bakeCollisionMeshes: 0 bakeCollisionMeshes: 0
forceSingleInstance: 0 forceSingleInstance: 0
useFlipModelSwapchain: 1
resizableWindow: 0 resizableWindow: 0
useMacAppStoreValidation: 0 useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games macAppStoreCategory: public.app-category.games
@ -127,6 +125,7 @@ PlayerSettings:
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1
xboxOneDisableKinectGpuReservation: 1 xboxOneDisableKinectGpuReservation: 1
xboxOneEnable7thCore: 1 xboxOneEnable7thCore: 1
isWsaHolographicRemotingEnabled: 0
vrSettings: vrSettings:
cardboard: cardboard:
depthFormat: 0 depthFormat: 0
@ -141,12 +140,6 @@ PlayerSettings:
hololens: hololens:
depthFormat: 1 depthFormat: 1
depthBufferSharingEnabled: 1 depthBufferSharingEnabled: 1
lumin:
depthFormat: 0
frameTiming: 2
enableGLCache: 0
glCacheMaxBlobSize: 524288
glCacheMaxFileSize: 8388608
oculus: oculus:
sharedDepthBuffer: 1 sharedDepthBuffer: 1
dashSupport: 1 dashSupport: 1
@ -154,7 +147,6 @@ PlayerSettings:
protectedContext: 0 protectedContext: 0
v2Signing: 0 v2Signing: 0
enable360StereoCapture: 0 enable360StereoCapture: 0
isWsaHolographicRemotingEnabled: 0
protectGraphicsMemory: 0 protectGraphicsMemory: 0
enableFrameTimingStats: 0 enableFrameTimingStats: 0
useHDRDisplay: 0 useHDRDisplay: 0
@ -203,10 +195,6 @@ PlayerSettings:
iPadHighResPortraitSplashScreen: {fileID: 0} iPadHighResPortraitSplashScreen: {fileID: 0}
iPadLandscapeSplashScreen: {fileID: 0} iPadLandscapeSplashScreen: {fileID: 0}
iPadHighResLandscapeSplashScreen: {fileID: 0} iPadHighResLandscapeSplashScreen: {fileID: 0}
iPhone65inPortraitSplashScreen: {fileID: 0}
iPhone65inLandscapeSplashScreen: {fileID: 0}
iPhone61inPortraitSplashScreen: {fileID: 0}
iPhone61inLandscapeSplashScreen: {fileID: 0}
appleTVSplashScreen: {fileID: 0} appleTVSplashScreen: {fileID: 0}
appleTVSplashScreen2x: {fileID: 0} appleTVSplashScreen2x: {fileID: 0}
tvOSSmallIconLayers: [] tvOSSmallIconLayers: []
@ -266,14 +254,11 @@ PlayerSettings:
AndroidEnableTango: 0 AndroidEnableTango: 0
androidEnableBanner: 1 androidEnableBanner: 1
androidUseLowAccuracyLocation: 0 androidUseLowAccuracyLocation: 0
androidUseCustomKeystore: 0
m_AndroidBanners: m_AndroidBanners:
- width: 320 - width: 320
height: 180 height: 180
banner: {fileID: 0} banner: {fileID: 0}
androidGamepadSupportLevel: 0 androidGamepadSupportLevel: 0
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
resolutionDialogBanner: {fileID: 0} resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: [] m_BuildTargetIcons: []
m_BuildTargetPlatformIcons: [] m_BuildTargetPlatformIcons: []
@ -312,10 +297,9 @@ PlayerSettings:
m_Devices: m_Devices:
- Oculus - Oculus
- OpenVR - OpenVR
m_BuildTargetEnableVuforiaSettings: []
openGLRequireES31: 0 openGLRequireES31: 0
openGLRequireES31AEP: 0 openGLRequireES31AEP: 0
openGLRequireES32: 0
vuforiaEnabled: 0
m_TemplateCustomTags: {} m_TemplateCustomTags: {}
mobileMTRendering: mobileMTRendering:
Android: 1 Android: 1
@ -499,7 +483,6 @@ PlayerSettings:
ps4DownloadDataSize: 0 ps4DownloadDataSize: 0
ps4GarlicHeapSize: 2048 ps4GarlicHeapSize: 2048
ps4ProGarlicHeapSize: 2560 ps4ProGarlicHeapSize: 2560
playerPrefsMaxSize: 32768
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
ps4pnSessions: 1 ps4pnSessions: 1
ps4pnPresence: 1 ps4pnPresence: 1
@ -533,7 +516,6 @@ PlayerSettings:
monoEnv: monoEnv:
splashScreenBackgroundSourceLandscape: {fileID: 0} splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0} splashScreenBackgroundSourcePortrait: {fileID: 0}
blurSplashScreenBackground: 1
spritePackerPolicy: spritePackerPolicy:
webGLMemorySize: 16 webGLMemorySize: 16
webGLExceptionSupport: 1 webGLExceptionSupport: 1
@ -548,7 +530,6 @@ PlayerSettings:
webGLCompressionFormat: 1 webGLCompressionFormat: 1
webGLLinkerTarget: 1 webGLLinkerTarget: 1
webGLThreadsSupport: 0 webGLThreadsSupport: 0
webGLWasmStreaming: 0
scriptingDefineSymbols: {} scriptingDefineSymbols: {}
platformArchitecture: {} platformArchitecture: {}
scriptingBackend: {} scriptingBackend: {}
@ -558,8 +539,6 @@ PlayerSettings:
allowUnsafeCode: 0 allowUnsafeCode: 0
additionalIl2CppArgs: additionalIl2CppArgs:
scriptingRuntimeVersion: 1 scriptingRuntimeVersion: 1
gcIncremental: 0
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform: {} apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1 m_RenderingPath: 1
m_MobileRenderingPath: 1 m_MobileRenderingPath: 1
@ -590,6 +569,7 @@ PlayerSettings:
metroFTAName: metroFTAName:
metroFTAFileTypes: [] metroFTAFileTypes: []
metroProtocolName: metroProtocolName:
metroCompilationOverrides: 1
XboxOneProductId: XboxOneProductId:
XboxOneUpdateKey: XboxOneUpdateKey:
XboxOneSandboxId: XboxOneSandboxId:
@ -628,7 +608,7 @@ PlayerSettings:
m_PortalFolderPath: m_PortalFolderPath:
luminCert: luminCert:
m_CertPath: m_CertPath:
m_SignPackage: 1 m_PrivateKeyPath:
luminIsChannelApp: 0 luminIsChannelApp: 0
luminVersion: luminVersion:
m_VersionCode: 1 m_VersionCode: 1

@ -3,7 +3,8 @@
--- !u!78 &1 --- !u!78 &1
TagManager: TagManager:
serializedVersion: 2 serializedVersion: 2
tags: [] tags:
- onFoot
layers: layers:
- Default - Default
- TransparentFX - TransparentFX

Loading…
Cancel
Save