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}
m_Layer: 5
m_Name: RawImage
m_TagString: Untagged
m_TagString: onFoot
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -85,5 +85,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
totalTime: 0.5
id: 0
stat: 0
tuio_event: {fileID: 0}
fade_speed: 0.02
stat: 0

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

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

@ -46,7 +46,7 @@ public class tuio_event : MonoBehaviour
{
GameObject g = Instantiate(img, canvas.GetComponent<Transform>());
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);
if (isExitTouch)
{
GameObject.Find(_id.ToString()).GetComponent<movieController>().stat = 2;
//Destroy(GameObject.Find(_id.ToString()));
//GameObject.Find(_id.ToString()).GetComponent<movieController>().stat = 2;
Destroy(GameObject.Find(_id.ToString()));
}
}
}
//Vector2 pos = tuio_input.GetTouch(0).position;
//img.GetComponent<RectTransform>().position = new Vector3(pos.x, pos.y, 0);
reset_id();
}
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
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_ExternalVersionControlSupport: Hidden Meta Files
serializedVersion: 7
m_ExternalVersionControlSupport: Visible Meta Files
m_SerializationMode: 2
m_LineEndingsForNewScripts: 2
m_DefaultBehaviorMode: 0
@ -20,7 +20,4 @@ EditorSettings:
m_ProjectGenerationRootNamespace:
m_CollabEditorSettings:
inProgressEnabled: 1
m_EnableTextureStreamingInEditMode: 1
m_EnableTextureStreamingInPlayMode: 1
m_AsyncShaderCompilation: 1
m_ShowLightmapResolutionOverlay: 1

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

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

Loading…
Cancel
Save