Commit d3b42869 authored by saad's avatar saad

add all bomb vis

parent 939924b1
This diff is collapsed.
fileFormatVersion: 2
guid: 8d292c5cb8ab2294caa1815f0bb5e08f
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8ca83b85a0f0a994282a5f28b875225e
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -63,7 +63,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 5bc489bca3223db45a55b31bbe657fd9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
......
......@@ -49,7 +49,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 69422208bb7cbfb46a1a4e60390d653b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
......
fileFormatVersion: 2
guid: 926cedc95907e5d46af4bb31ba7cc5d9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using Timers;
using UnityEngine;
public class ChainedTimers : MonoBehaviour
{
void Start()
{
TimersManager.SetTimer(this, 1f, () =>
{
Debug.Log("Timer 1");
TimersManager.SetTimer(this, 1f, () =>
{
Debug.Log("Timer 2");
TimersManager.SetTimer(this, 1f, () =>
{
Debug.Log("Timer 3");
TimersManager.SetTimer(this, 1f, () =>
{
Debug.Log("Timer 4");
TimersManager.SetTimer(this, 1f, () =>
{
Debug.Log("Timer 5");
});
});
});
});
});
}
}
fileFormatVersion: 2
guid: 715e2c5ce05ed8e4491a425eca22dbb8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 6f01121d70982904ea2d2472460ec4d9
labels:
- DelayedFunction
- TimersManager
- TimerManager
- Timer
timeCreated: 1454238091
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!850595691 &4890085278179872738
LightingSettings:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DemoSceneSettings
serializedVersion: 3
m_GIWorkflowMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_RealtimeEnvironmentLighting: 1
m_BounceScale: 1
m_AlbedoBoost: 1
m_IndirectOutputScale: 1
m_UsingShadowmask: 0
m_BakeBackend: 0
m_LightmapMaxSize: 1024
m_BakeResolution: 40
m_Padding: 2
m_TextureCompression: 1
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 0
m_CompAOExponentDirect: 0
m_ExtractAO: 0
m_MixedBakeMode: 1
m_LightmapsBakeMode: 1
m_FilterMode: 1
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_RealtimeResolution: 2
m_ForceWhiteAlbedo: 0
m_ForceUpdates: 0
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_FinalGatherFiltering: 1
m_PVRCulling: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVREnvironmentSampleCount: 512
m_PVREnvironmentReferencePointCount: 2048
m_LightProbeSampleCountMultiplier: 4
m_PVRBounces: 2
m_PVRMinBounces: 2
m_PVREnvironmentMIS: 0
m_PVRFilteringMode: 0
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
fileFormatVersion: 2
guid: b1a57a84c353e2d48ab6e9cdb298b2a0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4890085278179872738
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e26702ceff2c4df43ba9b6c8fa249524
labels:
- DelayedFunction
- TimersManager
- TimerManager
- Timer
timeCreated: 1454271714
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 670e1e1757300054a810dee1edfc4c3a
folderAsset: yes
timeCreated: 1454397828
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0f666f5c77dd13e429030f534073f9d8
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
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 16
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
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: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
cookieLightType: 1
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: Android
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: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2973194104380120475
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Material
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: e718aece9be8fed429fa1f81fbe6e803
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7474cb2e6ef5f7f449d21134be253e2e
labels:
- DelayedFunction
- TimersManager
- TimerManager
- Timer
timeCreated: 1454271714
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3dbed6c162be5674888e552918494394
labels:
- Timer
- TimerManager
- TimersManager
- DelayedFunction
folderAsset: yes
timeCreated: 1454270092
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;using Timers; [RequireComponent(typeof(Light))]public class BlueLightFlicker : MonoBehaviour{ private Light m_PointLight = null; void Start() { m_PointLight = gameObject.GetComponent<Light>(); // set a timer that calls ChangeIntensity() every 0.1 seconds TimersManager.SetLoopableTimer(this, 0.1f, ChangeIntensity); TimersManager.SetTimer(this, 5f, () => Destroy(this)); } void ChangeIntensity() { m_PointLight.intensity = Random.Range(0f, 3f); } }
\ No newline at end of file
fileFormatVersion: 2
guid: 62d2eae727627574ca8ee13920fe5a91
timeCreated: 1454270233
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine; [RequireComponent(typeof(Light))]public class RedLightFlicker : MonoBehaviour{ private Light m_PointLight = null; void Start() { m_PointLight = gameObject.GetComponent<Light>(); } public void ChangeIntensity() { m_PointLight.intensity = Random.Range(0f, 3f); }}
\ No newline at end of file
fileFormatVersion: 2
guid: 5be999720ddc17a409ae1218526b8bb6
timeCreated: 1454270614
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b3a6bc5613cebe54499a7b3324ce693d
labels:
- Timer
- TimerManager
- TimersManager
- DelayedFunction
folderAsset: yes
timeCreated: 1454152423
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;using System.Collections.Generic;using Timers; public class GUI_TimersList : MonoBehaviour{ [SerializeField] public List<Timer.Descriptor> Timers = new List<Timer.Descriptor>(); protected virtual void Start() { TimersManager.AddTimers(this, Timers); }}
\ No newline at end of file
fileFormatVersion: 2
guid: 1b1e2d347615a4a46a88d2c461b47652
timeCreated: 1454188421
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Events;
[assembly: InternalsVisibleToAttribute("TimersManager")]
namespace Timers
{
public class Timer
{
[Serializable]
public struct Descriptor
{
[SerializeField]
private bool m_InfiniteLoops;
[SerializeField]
private uint m_LoopsCount;
[SerializeField]
private float m_Interval;
[SerializeField]
private bool m_UnscaledTime;
[SerializeField]
private UnityEvent m_Event;
public float Interval => m_Interval;
public bool UnscaledTime => m_UnscaledTime;
public uint LoopsCount => m_InfiniteLoops ? Timer.INFINITE_LOOPS : m_LoopsCount;
public UnityEvent Event => m_Event;
}
public const uint INFINITE_LOOPS = uint.MaxValue;
private float m_Interval = 0;
private uint m_LoopsCount = 1;
private event Action m_Action = null;
private WeakReference m_Owner = null;
private bool m_bIsPaused = false;
private bool m_UnscaledTime = false;
private uint m_CurrentLoopsCount = 0;
private float m_ElapsedTime = 0;
private float m_CurrentCycleElapsedTime = 0;
internal void Update()
{
if (m_bIsPaused || !IsValid(Owner))
return;
if (m_Action == null || m_Interval < 0)
{
m_Interval = 0;
return;
}
if (m_CurrentLoopsCount >= m_LoopsCount && m_LoopsCount != INFINITE_LOOPS)
{
m_ElapsedTime = m_Interval * m_LoopsCount;
m_CurrentCycleElapsedTime = m_Interval;
}
else
{
m_ElapsedTime += m_UnscaledTime ? Time.unscaledDeltaTime : Time.deltaTime;
if (m_LoopsCount != INFINITE_LOOPS)
m_ElapsedTime = Mathf.Min(m_ElapsedTime, m_Interval * m_LoopsCount);
m_CurrentCycleElapsedTime = Mathf.Min(m_Interval, m_ElapsedTime - m_CurrentLoopsCount * m_Interval);
if (m_CurrentCycleElapsedTime == m_Interval)
{
m_CurrentLoopsCount++;
m_CurrentCycleElapsedTime = 0f;
m_Action?.Invoke();
}
}
}
public static Timer FromDescriptor(object owner, Timer.Descriptor descriptor)
{
return new Timer(
owner: owner,
interval: descriptor.Interval,
loopsCount: Math.Max(1, descriptor.LoopsCount),
unscaledTime: descriptor.UnscaledTime,
action: () => descriptor.Event?.Invoke()
);
}
public Timer(object owner, float interval, uint loopsCount, bool unscaledTime, Action action)
{
if (owner == null)
{
Debug.LogException(new Exception("Timer requre a valid owner, got null"));
return;
}
if (interval < 0)
interval = 0;
m_UnscaledTime = unscaledTime;
m_Owner = new WeakReference(owner);
m_Interval = interval;
m_LoopsCount = System.Math.Max(loopsCount, 1);
m_Action = action;
}
~Timer()
{
m_Action = null;
}
/// <summary>
/// Timer ID
/// </summary>
public int Id => this.GetHashCode();
/// <summary>
/// Get interval
/// </summary>
public object Owner => m_Owner.Target;
/// <summary>
/// Get interval
/// </summary>
public float Interval => m_Interval;
/// <summary>
/// Get total loops count (INFINITE (which is uint.MaxValue) if is constantly looping)
/// </summary>
public uint LoopsCount => m_LoopsCount;
/// <summary>
/// Get how many loops were completed
/// </summary>
public uint CurrentLoopsCount => m_CurrentLoopsCount;
/// <summary>
/// Get how many loops remained to completion
/// </summary>
public uint RemainingLoopsCount => LoopsCount - CurrentLoopsCount;
/// <summary>
/// Get total duration, (INFINITE if it's constantly looping)
/// </summary>
public float Duration => (LoopsCount == INFINITE_LOOPS) ? Mathf.Infinity : (LoopsCount * Interval);
/// <summary>
/// Get the delegate to execute
/// </summary>
public Action Action => m_Action;
/// <summary>
/// Get total remaining time
/// </summary>
public float RemainingTime => (LoopsCount == INFINITE_LOOPS && Interval > 0f) ? Mathf.Infinity : Mathf.Max(LoopsCount * Interval - ElapsedTime, 0f);
/// <summary>
/// Get total elapsed time
/// </summary>
public float ElapsedTime => m_ElapsedTime;
/// <summary>
/// Get elapsed time in current loop
/// </summary>
public float CurrentCycleElapsedTime => m_CurrentCycleElapsedTime;
/// <summary>
/// Get remaining time in current loop
/// </summary>
public float CurrentCycleRemainingTime => Mathf.Max(Interval - CurrentCycleElapsedTime, 0);
/// <summary>
/// Checks whether this timer is ok to be removed
/// </summary>
public bool ShouldClear => m_Action == null || RemainingTime == 0 || !IsValid(Owner);
/// <summary>
/// Checks if the timer is paused
/// </summary>
public bool IsPaused => m_bIsPaused;
/// <summary>
/// Pause / Inpause timer
/// </summary>
public void SetPaused(bool bPause) { m_bIsPaused = bPause; }
/// <summary>
/// Compare frequency (calls per second)
/// </summary>
public static bool operator >(Timer A, Timer B) { return (A == null || B == null) ? true : A.Interval < B.Interval; }
/// <summary>
/// Compare frequency (calls per second)
/// </summary>
public static bool operator <(Timer A, Timer B) { return (A == null || B == null) ? true : A.Interval > B.Interval; }
/// <summary>
/// Compare frequency (calls per second)
/// </summary>
public static bool operator >=(Timer A, Timer B) { return (A == null || B == null) ? true : A.Interval <= B.Interval; }
/// <summary>
/// Compare frequency (calls per second)
/// </summary>
public static bool operator <=(Timer A, Timer B) { return (A == null || B == null) ? true : A.Interval >= B.Interval; }
static bool IsValid(object obj)
{
return obj is UnityEngine.Object unityObj
? unityObj
: obj != null;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: dfff2c5cba6effe4996fda34bedfcfce
timeCreated: 1454161132
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b833583f268e1794481968f72b621792
timeCreated: 1454397944
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 0f666f5c77dd13e429030f534073f9d8, type: 3}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-2719129155603008223
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Red Screen 1
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0.66
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 1
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.34509805, g: 0.009517193, b: 0, a: 1}
- _Color: {r: 0.34509802, g: 0.009517193, b: 0, a: 1}
- _EmissionColor: {r: 0.043137256, g: 0.01573982, b: 0.015686275, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: 0ba7dcfa1aa07be459bdef998173da87
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Wire
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.2
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &8076104653155362330
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7
fileFormatVersion: 2
guid: 530a2fd6da5521748977fb13c762e135
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 39a0d4a1f4fe2a649af24d0e64bde45a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9019275256872145588
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8626780303006245093}
- component: {fileID: 3944800286380083876}
- component: {fileID: 8597538289810706562}
- component: {fileID: 8299607319623816837}
m_Layer: 0
m_Name: Wire 1
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8626780303006245093
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019275256872145588}
serializedVersion: 2
m_LocalRotation: {x: -0.00000011520235, y: 0.7071067, z: 0.7071068, w: 0.00000011520233}
m_LocalPosition: {x: -0.14804459, y: 0.01290369, z: -0.008018494}
m_LocalScale: {x: 36.60218, y: 36.602177, z: 36.602177}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 1223967663067302533}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &3944800286380083876
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019275256872145588}
m_Mesh: {fileID: 2716544666522815736, guid: 42d24bd2e42403c4c9425378b7670ff3, type: 3}
--- !u!23 &8597538289810706562
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019275256872145588}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: -205629353262513385, guid: 42d24bd2e42403c4c9425378b7670ff3, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!114 &8299607319623816837
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9019275256872145588}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 26d40ad5d2ba800479d6dd0230b2163a, type: 3}
m_Name:
m_EditorClassIdentifier:
_answerLabel: {fileID: 6146705394898062517}
_wireMesh: {fileID: 0}
_cutWireMesh: {fileID: 0}
_meshFilter: {fileID: 3944800286380083876}
_meshRender: {fileID: 8597538289810706562}
image: {fileID: 1728234619644920308}
line: {fileID: 7243715837513289244}
_color: {r: 0, g: 0, b: 0, a: 0}
_button: {fileID: 5459509267802171274}
--- !u!1001 &5747940244456248903
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 8626780303006245093}
m_Modifications:
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_SelectedColor.b
value: 0.5258312
objectReference: {fileID: 0}
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_SelectedColor.g
value: 0.93207544
objectReference: {fileID: 0}
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_SelectedColor.r
value: 0.8118833
objectReference: {fileID: 0}
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_HighlightedColor.b
value: 0.63001066
objectReference: {fileID: 0}
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_HighlightedColor.g
value: 0.63001066
objectReference: {fileID: 0}
- target: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Colors.m_HighlightedColor.r
value: 0.9622642
objectReference: {fileID: 0}
- target: {fileID: 3784596669894271944, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Name
value: Answer UI
objectReference: {fileID: 0}
- target: {fileID: 5962531538022302040, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_CullTransparentMesh
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6358841915907725235, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_Color.a
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6791008290233596731, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 39a0d4a1f4fe2a649af24d0e64bde45a, type: 3}
--- !u!4 &1223967663067302533 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6861411225491578050, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
m_PrefabInstance: {fileID: 5747940244456248903}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1728234619644920308 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6358841915907725235, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
m_PrefabInstance: {fileID: 5747940244456248903}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &5459509267802171274 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 288472208977801677, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
m_PrefabInstance: {fileID: 5747940244456248903}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6146705394898062517 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1912256122096245490, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
m_PrefabInstance: {fileID: 5747940244456248903}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0e20cc1eab1d04e7c9515c000ca5ba22, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!120 &7243715837513289244 stripped
LineRenderer:
m_CorrespondingSourceObject: {fileID: 3117071613802403931, guid: 39a0d4a1f4fe2a649af24d0e64bde45a,
type: 3}
m_PrefabInstance: {fileID: 5747940244456248903}
m_PrefabAsset: {fileID: 0}
fileFormatVersion: 2
guid: bbdeff09fea42b34baef4d5aee1926e0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -2,12 +2,13 @@ using System.Collections;
using UnityEngine;
using TMPro;
using DG.Tweening.Core.Easing;
using ALArcade.ArabicTMP;
public class BombController : MonoBehaviour
{
[Header("Display")]
[SerializeField] private TextMeshPro questionDisplayText;
[SerializeField] private TextMeshPro timerText;
[SerializeField] private ArabicTextMeshProUGUI questionDisplayText;
[SerializeField] private TextMeshProUGUI timerText;
[Header("Wires")]
[SerializeField] private Wire wireA;
......@@ -20,24 +21,24 @@ public class BombController : MonoBehaviour
[SerializeField] private ParticleSystem wrongParticles;
private QuestionSO currentQuestion;
private GameManager gameManager;
private float timeRemaining;
private bool answered = false;
//private GameManager gameManager;
public void Initialize(QuestionSO question, GameManager manager)
{
currentQuestion = question;
gameManager = manager;
timeRemaining = question.timeLimit;
// Set question text
questionDisplayText.text = question.questionText;
// Assign answers to wires
/*wireA.SetAnswer('A', question.optionA, this);
wireA.SetAnswer('A', question.optionA, this);
wireB.SetAnswer('B', question.optionB, this);
wireC.SetAnswer('C', question.optionC, this);
wireD.SetAnswer('D', question.optionD, this);*/
wireD.SetAnswer('D', question.optionD, this);
//gameManager = manager;
StartCoroutine(TimerCountdown());
}
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class FloatingObject : MonoBehaviour
{
public float floatHeight = 0.5f;
public float floatDuration = 2f;
public Ease floatEase = Ease.InOutSine;
public bool rotate = false;
public float rotationSpeed = 90f;
private Vector3 startPosition;
private Sequence floatSequence;
void Start()
{
startPosition = transform.position;
StartFloating();
floatHeight = Random.Range(floatHeight, floatHeight * 2);
}
void StartFloating()
{
// Create the floating animation sequence
floatSequence = DOTween.Sequence();
// Move up
floatSequence.Append(transform.DOMoveY(startPosition.y + floatHeight, floatDuration)
.SetEase(floatEase));
// Move down
floatSequence.Append(transform.DOMoveY(startPosition.y, floatDuration)
.SetEase(floatEase));
// Loop forever
floatSequence.SetLoops(-1);
}
void Update()
{
// Add rotation if enabled
if (rotate)
{
transform.Rotate(Vector3.up, rotationSpeed * Time.deltaTime);
}
}
void OnDestroy()
{
// Clean up tweens when object is destroyed
if (floatSequence != null && floatSequence.IsActive())
{
floatSequence.Kill();
}
}
// Public method to restart floating animation
public void RestartFloating()
{
if (floatSequence != null && floatSequence.IsActive())
{
floatSequence.Kill();
}
StartFloating();
}
// Public method to pause floating animation
public void PauseFloating()
{
if (floatSequence != null && floatSequence.IsActive())
{
floatSequence.Pause();
}
}
// Public method to resume floating animation
public void ResumeFloating()
{
if (floatSequence != null && floatSequence.IsActive())
{
floatSequence.Play();
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 994ed4bdc849caf419bf5d6c12d2f237
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[ExecuteInEditMode]
public class TwoPointsLine : MonoBehaviour
{
public Transform pointA;
public Transform pointB;
private LineRenderer line;
// Start is called before the first frame update
public void Start()
{
line = GetComponent<LineRenderer>();
}
// Update is called once per frame
public void Update()
{
if (pointA != null && pointB != null && line != null)
{
line.positionCount = 2;
line.SetPosition(0, pointA.position);
line.SetPosition(1, pointB.position);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: f4c3522fb2ba4d046a34119f7cc4a5ea
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VerticalBillboard : MonoBehaviour
{
public Transform target;
private void Start()
{
target = Camera.main.transform;
}
void Update()
{
if (target != null)
{
transform.LookAt(target, Vector3.up);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: fc2bbb1dbde38d041a67fab2a3f80c89
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using ALArcade.ArabicTMP;
using UnityEngine.UI;
public class Wire : MonoBehaviour
{
// Start is called before the first frame update
void Start()
[SerializeField] private ArabicTextMeshProUGUI _answerLabel;
[SerializeField] private Mesh _wireMesh;
[SerializeField] private Mesh _cutWireMesh;
[SerializeField] private MeshFilter _meshFilter;
[SerializeField] private MeshRenderer _meshRender;
[SerializeField] private Image image;
[SerializeField] private LineRenderer line;
[SerializeField] private Color _color;
[SerializeField] private Button _button;
/*[Header("Materials")]
[SerializeField] private Material normalMaterial;
[SerializeField] private Material hoverMaterial;
[SerializeField] private Material cutMaterial;
[Header("Cut Effect")]
[SerializeField] private ParticleSystem cutParticles;*/
private char _wireAnswer;
private BombController _bombController;
private bool _isCut = false;
private void Start()
{
_meshFilter = GetComponent<MeshFilter>();
_meshRender = GetComponent<MeshRenderer>();
_meshFilter.mesh = _wireMesh;
_meshRender = _meshRender.GetComponent<MeshRenderer>();
_meshRender.material.color = _color;
image.color = _color;
line.startColor = _color;
line.endColor = _color;
gameObject.AddComponent<MeshCollider>();
_button.onClick.AddListener(CutWire);
}
public void SetAnswer(char answer, string answerText, BombController controller)
{
_wireAnswer = answer;
_answerLabel.text = $"{answerText}: {answer}";
_bombController = controller;
}
void OnMouseEnter()
{
Debug.Log("Enter");
}
void OnMouseExit()
{
Debug.Log("Exit");
}
// Update is called once per frame
void Update()
void OnMouseDown()
{
if (!_isCut)
{
CutWire();
}
}
void CutWire()
{
Debug.Log("Cut");
_isCut = true;
// Visual feedback - change material
// Play cut particles
/*if (cutParticles != null)
cutParticles.Play();*/
// Notify bomb controller
// _bombController.OnWireClicked(_wireAnswer);
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment