activity6 #1

Merged
EthanPisani merged 78 commits from activity6 into main 2025-04-12 14:58:57 -04:00
28 changed files with 24780 additions and 446 deletions
Showing only changes of commit f319ba2bf1 - Show all commits

View File

@ -167,10 +167,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ReferenceResolution: {x: 1000, y: 720}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
@ -275,7 +275,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 0.9056604, g: 0.9056604, b: 0.9056604, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@ -774,6 +774,135 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 691295378}
m_CullTransparentMesh: 1
--- !u!1 &1421275909
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1421275911}
- component: {fileID: 1421275910}
m_Layer: 0
m_Name: Audio Source
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!82 &1421275910
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1421275909}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 61c08e4dfdffc56868f82a9550745292, type: 3}
m_Resource: {fileID: 8300000, guid: 61c08e4dfdffc56868f82a9550745292, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!4 &1421275911
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1421275909}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 521.76965, y: 319.30856, z: 1.3679777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1663050498
GameObject:
m_ObjectHideFlags: 0
@ -1469,3 +1598,4 @@ SceneRoots:
- {fileID: 1940788615}
- {fileID: 42199227}
- {fileID: 674070190}
- {fileID: 1421275911}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Door1_017
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: 7525048615988343914}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &2694332093260277242
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DoorAnimation_017
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: fb9843d38a7c1595eb66650fe0484858, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1102 &6246023032127397891
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New State
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 0}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &7525048615988343914
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 2694332093260277242}
m_Position: {x: 380, y: 80, z: 0}
- serializedVersion: 1
m_State: {fileID: 6246023032127397891}
m_Position: {x: 380, y: 20, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 6246023032127397891}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5a68c681575a0a1a18ec0a7392399f3f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,213 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: DoorAnimation.017
serializedVersion: 7
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: {x: -90, y: 0, z: 180}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
- serializedVersion: 3
time: 2.1666667
value: {x: -80.9, y: 0, z: 180}
inSlope: {x: 0, y: 0, z: 0}
outSlope: {x: 0, y: 0, z: 0}
tangentMode: 0
weightedMode: 0
inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334}
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 4
script: {fileID: 0}
typeID: 4
customType: 4
isPPtrCurve: 0
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 2.1666667
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -90
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2.1666667
value: -80.9
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.x
path:
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2.1666667
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.y
path:
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 180
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 2.1666667
value: 180
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: localEulerAnglesRaw.z
path:
classID: 4
script: {fileID: 0}
flags: 0
m_EulerEditorCurves:
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.x
path:
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.y
path:
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve: []
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_LocalEulerAngles.z
path:
classID: 4
script: {fileID: 0}
flags: 0
m_HasGenericRootTransform: 1
m_HasMotionFloatCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fb9843d38a7c1595eb66650fe0484858
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

20640
Assets/Scenes/level2.unity Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2ae7d18dd781336fb8df1faeeb148407
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -17,6 +17,8 @@ public class LightSwitchInteraction : MonoBehaviour
[SerializeField] private string animationFile = "DoorAnimation.013";
[SerializeField] private Animator myDoor = null;
[SerializeField] private GameObject enableAfterLightsFixed = null;
void Awake()
{
outline = GetComponent<Outline>();
@ -29,13 +31,21 @@ public class LightSwitchInteraction : MonoBehaviour
interactionPrompt.enabled = false;
}
}
void PlayDoorAnimation()
{
if (myDoor != null)
{
myDoor.Play(animationFile);
}
}
void Update()
{
if (!isLightsFixed)
{
Ray ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width / 2, Screen.height / 2, 0));
if (Physics.Raycast(ray, out RaycastHit hit, 10f))
if (Physics.Raycast(ray, out RaycastHit hit, 5f))
{
if (hit.collider.gameObject == gameObject)
{
@ -68,13 +78,21 @@ public class LightSwitchInteraction : MonoBehaviour
// Play Sound for lever
if (leverSound != null)
{
Debug.Log("Playing sound: " + leverSound.name);
SoundFXManager.instance.PlaySound(leverSound, transform, 2.0f);
}
// open door
// open door after audio is done
if (enableAfterLightsFixed != null)
{
Debug.Log("Enabling audio clip");
// enable box collider of object
enableAfterLightsFixed.GetComponent<BoxCollider>().enabled = true;
}
if (myDoor != null)
{
myDoor.Play(animationFile, 0, 0.0f);
Invoke("PlayDoorAnimation", 16.0f);
}
}
}
else

View File

@ -1,143 +1,184 @@
using System.Collections;
using UnityEngine;
using TMPro;
using UnityEngine.UIElements;
public class OpenDoor : MonoBehaviour
public class DoorInteraction : MonoBehaviour
{
[SerializeField] private Animator myDoor = null;
[SerializeField] private Animator tabletAnimator = null;
[SerializeField] private GameObject tabletObject = null; // Reference to the tablet object
[SerializeField] public bool openTrigger = false;
[SerializeField] private string animationFile = "DoorAnimation.013";
[SerializeField] private bool playTabletAnimation = true;
[SerializeField] private GameObject crosshair = null; // enable and disable crosshair when player in tablet trigger
[SerializeField] private StarterAssets.StarterAssetsInputs mouseLook = null;
// [SerializeField] private Transform playerCamera = null;
[SerializeField] private float interactionDistance = 2f;
[SerializeField] private TabletController tabletController = null;
[SerializeField] private ControlScript controlScript = null;
[SerializeField] private AudioClip victorySound = null;
// set number of bombs and grid size
[SerializeField] private int bombs = 9;
[SerializeField] private int gridSize = 11;
[SerializeField] private int timeLimitSeconds = 10;
private void OnTriggerEnter(Collider other)
[SerializeField] private TextMeshProUGUI targetDoorText = null;
[SerializeField] private UnityEngine.UI.Image tabletIcon = null;
[SerializeField] private TextMeshProUGUI closeTabletPrompt = null;
public TMP_Text interactionPrompt;
// private bool isTabletOpen = false;
public bool skipPuzzle = false;
private bool isBeingLookedAt = false;
private bool startedPuzzle = false;
private static int doorCount = 0; // n doors being looked at
void Awake()
{
if (other.CompareTag("Player"))
if (interactionPrompt != null && doorCount == 0)
{
Debug.Log("Player has entered the trigger I am: " + gameObject.name);
if (!openTrigger)
interactionPrompt.enabled = false;
}
}
void OnDisable()
{
if (interactionPrompt != null)
{
interactionPrompt.enabled = false;
}
}
private void Update()
{
if (skipPuzzle) {
// open door animation and delete self
myDoor.Play(animationFile, 0, 0.0f);
gameObject.SetActive(false);
}
else {
bool lookedAt = IsPlayerLookingAtDoor();
if (lookedAt && !isBeingLookedAt)
{
if (myDoor == null)
{
Debug.LogError("myDoor is null");
return;
}
if (tabletObject == null)
{
Debug.LogError("tabletObject is null");
return;
}
// open door or play tablet open animation
if (playTabletAnimation)
{
// set puzzleComplete to false
var puzzleScript = tabletObject.GetComponent<TabletScript>(); // Assuming the script is named "TabletScript"
if (puzzleScript == null)
{
Debug.LogError("TabletScript component not found on tabletObject");
return;
}
puzzleScript.puzzleComplete = false;
// disable crosshair
crosshair.SetActive(false);
// set player motion to 0
mouseLook.move = Vector2.zero;
mouseLook.look = Vector2.zero;
// play the tablet open animation
tabletAnimator.Play("Tablet_Open", 0, 0.0f);
if (mouseLook != null)
{
mouseLook.cursorInputForLook = false;
}
// unlock cursor
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
// set state to playing on control script for mines, reset the game
if (controlScript != null)
{
controlScript.GridSizeX = gridSize;
controlScript.GridSizeY = gridSize;
controlScript.TotalMines = bombs;
controlScript.timeLimitSeconds = timeLimitSeconds;
controlScript.Restart();
}
isBeingLookedAt = true;
Debug.Log("Door is being looked at" + gameObject.name);
doorCount++;
}
else if (!lookedAt && isBeingLookedAt)
{
isBeingLookedAt = false;
doorCount--;
}
// Debug.Log("Door count: " + doorCount);
}
else
{
myDoor.Play(animationFile, 0, 0.0f);
}
// Start waiting for the puzzle to complete
StartCoroutine(WaitForPuzzleCompletion());
if (!tabletController.isShowing && doorCount > 0)
{
TextPopUp("Press T to open tablet.");
tabletIcon.enabled = true;
}
// if (tabletController.isShowing && doorCount < 1) {
// // we can tell to put away the tablet
// if (interactionPrompt != null)
// {
// interactionPrompt.enabled = true;
// }
// // TextPopUp("Press T to open and close tablet.");
// }
if (tabletController.isShowing && lookedAt) {
// set text on door to be Target Door: 000 (last 3 characters of animation file)
if (targetDoorText != null)
{
targetDoorText.text = "Target Door: " + animationFile.Substring(animationFile.Length - 3);
Debug.Log("Target Door: " + animationFile.Substring(animationFile.Length - 3));
}
// if player is not on main menu and game is not initialized and puzzle has not been started we start the puzzle for this door
if (!tabletController.isOnMainMenu && controlScript.GameState == ControlScript.EGameState.Uninitialized && !startedPuzzle)
{
StartPuzzle();
startedPuzzle = true;
}
}
}
if (doorCount <= 0 || tabletController.isShowing)
{
doorCount = 0;
tabletIcon.enabled = false;
if (interactionPrompt != null) {
interactionPrompt.enabled = false;
}
}
if (doorCount > 0 && !tabletController.isShowing)
{
// enable tablet icon on a screen
tabletIcon.enabled = true;
if (interactionPrompt != null)
{
interactionPrompt.enabled = true;
}
}
}
private void TextPopUp(string text)
{
if (interactionPrompt != null)
{
interactionPrompt.text = text;
interactionPrompt.enabled = true;
}
}
private bool IsPlayerLookingAtDoor()
{
Ray ray = Camera.main.ScreenPointToRay(new Vector3(Screen.width / 2, Screen.height / 2, 0));
if (Physics.Raycast(ray, out RaycastHit hit, interactionDistance))
{
return hit.collider.gameObject == gameObject;
}
return false;
}
private void StartPuzzle()
{
if (tabletController == null)
{
Debug.LogError("TabletController reference is missing.");
return;
}
controlScript.GridSizeX = gridSize;
controlScript.GridSizeY = gridSize;
controlScript.TotalMines = bombs;
controlScript.timeLimitSeconds = timeLimitSeconds;
Debug.Log("Starting puzzle");
controlScript.Restart();
StartCoroutine(WaitForPuzzleCompletion());
}
private IEnumerator WaitForPuzzleCompletion()
{
var puzzleScript = tabletObject.GetComponent<TabletScript>(); // Assuming the script is named "TabletScript"
if (puzzleScript == null)
{
Debug.LogError("TabletScript component not found on tabletObject");
yield break;
}
// set the text of the tablet to the current door number, will be last 3 letter of the door name
var doorNumber = gameObject.name.Substring(gameObject.name.Length - 3);
string doorText = "Target Door: " + doorNumber;
puzzleScript.SetDoorTargetText(doorText);
// convert time limit to minutes:seconds
var doorTimeLimit = "Time Limit: " + timeLimitSeconds / 60 + ":" + timeLimitSeconds % 60 + " ";
puzzleScript.SetDoorTimeLimitText(doorTimeLimit);
// Wait until controlscript is in state Win
yield return new WaitUntil(() => controlScript.GameState == ControlScript.EGameState.Win);
// SoundFXManager.instance.PlaySound(victorySound, transform, 1.0f);
// wait 5 seconds
yield return new WaitForSeconds(1.0f);
// reset the game state
controlScript.Restart();
Debug.Log("Puzzle completed! Playing animations...");
// Play the tablet close animation
if (playTabletAnimation)
{
tabletAnimator.Play("Tablet_Close", 0, 0.0f);
// enable crosshair
crosshair.SetActive(true);
// lock cursor
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
// var mouseLook = GetComponent<StarterAssets.StarterAssetsInputs>();
if (mouseLook != null)
{
mouseLook.cursorInputForLook = true;
}
}
// Play the door open animation
controlScript.GameState = ControlScript.EGameState.Uninitialized;
// set prompt on screen to close tablet
closeTabletPrompt.enabled = true;
myDoor.Play(animationFile, 0, 0.0f);
startedPuzzle = false;
// TextPopUp("Press T to Close tablet.");
gameObject.SetActive(false);
yield return null;
}
}

View File

@ -1,6 +1,8 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using System;
using UnityEngine.SceneManagement;
public class OpenNextLevel : MonoBehaviour
{
@ -8,8 +10,8 @@ public class OpenNextLevel : MonoBehaviour
private Outline outline;
[SerializeField] private Animator objectAnimator;
// [SerializeField] private string animationName = "PickupAnimation";
// [SerializeField] private AudioClip openSound;
[SerializeField] private string animationName = "PickupAnimation";
[SerializeField] private AudioClip openSound = null;
[SerializeField] private string doorName = "Deck D";
@ -17,6 +19,16 @@ public class OpenNextLevel : MonoBehaviour
private bool isOpened = false;
void LoadNextLevel()
{
// load level2.unity
// SceneManager.LoadScene("level2");
if (interactionPrompt != null)
{
interactionPrompt.text = "Congratulations! You Escaped!";
interactionPrompt.enabled = true;
}
}
void Awake()
{
@ -40,7 +52,7 @@ public class OpenNextLevel : MonoBehaviour
{
if (hit.collider.gameObject == gameObject)
{
if (interactionPrompt != null)
if (interactionPrompt != null && !Input.GetMouseButtonDown(0))
{
interactionPrompt.text = "Use Key Card to open door to " + doorName;
interactionPrompt.enabled = true;
@ -59,15 +71,24 @@ public class OpenNextLevel : MonoBehaviour
{
interactionPrompt.enabled = false;
}
// if (objectAnimator != null)
// {
// objectAnimator.Play(animationName, 0, 0.0f);
// }
// if (openSound != null)
// {
// SoundFXManager.instance.PlaySound(openSound, transform, 1.5f);
// }
if (objectAnimator != null)
{
objectAnimator.Play(animationName, 0, 0.0f);
}
if (openSound != null)
{
SoundFXManager.instance.PlaySound(openSound, transform, 1.0f);
}
Invoke("LoadNextLevel", 2.8f);
}
// else if (Input.GetMouseButtonDown(0) && !keyCardPlayer.hasKeyCard)
// {
// if (interactionPrompt != null)
// {
// interactionPrompt.text = "You need a key card to open this door";
// interactionPrompt.enabled = true;
// }
// }
}
else
{

View File

@ -1,33 +1,77 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using TMPro;
public class TabletController : MonoBehaviour
{
[SerializeField] Animator TabletAnimator;
[SerializeField] StarterAssets.StarterAssetsInputs mouseLook;
[SerializeField] GameObject crosshair;
private bool isShowing = false;
[SerializeField] GameObject mainMenuCanvas;
[SerializeField] GameObject puzzleCanvas;
[SerializeField] public bool isOnMainMenu = true;
[SerializeField] public TextMeshProUGUI closeTabletPrompt;
public bool isShowing = false;
private bool isMoving = false;
public void setIsOnMainMenu(bool isOnMainMenu)
{
this.isOnMainMenu = isOnMainMenu;
}
void Update()
{
// calculate if player is moving
if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D))
{
isMoving = true;
}
else if (Input.GetKeyUp(KeyCode.W) || Input.GetKeyUp(KeyCode.A) || Input.GetKeyUp(KeyCode.S) || Input.GetKeyUp(KeyCode.D))
{
isMoving = false;
}
if (Input.GetKeyDown(KeyCode.T) && !isMoving)
// if (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.A) || Input.GetKeyDown(KeyCode.S) || Input.GetKeyDown(KeyCode.D))
// {
// isMoving = true;
// }
// else if (Input.GetKeyUp(KeyCode.W) || Input.GetKeyUp(KeyCode.A) || Input.GetKeyUp(KeyCode.S) || Input.GetKeyUp(KeyCode.D))
// {
// isMoving = false;
// }&& !isMoving
if (Input.GetKeyDown(KeyCode.T))
{
// if is not showing play tablet open animation
if (!isShowing)
{
// disable prompt to close tablet
closeTabletPrompt.enabled = false;
TabletAnimator.Play("Tablet_Open");
crosshair.SetActive(false);
// set player motion to 0
mouseLook.move = Vector2.zero;
mouseLook.look = Vector2.zero;
if (mouseLook != null)
{
mouseLook.cursorInputForLook = false;
}
// unlock cursor
Cursor.lockState = CursorLockMode.None;
Cursor.visible = true;
}
// if is showing play tablet close animation
else
{
closeTabletPrompt.enabled = false;
// disable puzzle canvas
puzzleCanvas.SetActive(false);
// enable main menu canvas
mainMenuCanvas.SetActive(true);
isOnMainMenu = true;
TabletAnimator.Play("Tablet_Close");
crosshair.SetActive(true);
// lock cursor
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
if (mouseLook != null)
{
mouseLook.cursorInputForLook = true;
}
}
isShowing = !isShowing; // Toggle state

View File

@ -33,28 +33,28 @@ MonoBehaviour:
m_Settings:
m_SettingsList:
m_List:
- rid: 2002001032582004933
- rid: 2002001032582004934
- rid: 2002001080785829978
- rid: 2002001080785829979
- rid: 6852985685364965378
- rid: 6852985685364965379
- rid: 6852985685364965380
- rid: 6852985685364965381
- rid: 2002001032582004935
- rid: 2002001032582004936
- rid: 2002001080785829980
- rid: 2002001080785829981
- rid: 6852985685364965384
- rid: 6852985685364965385
- rid: 2002001032582004937
- rid: 2002001032582004938
- rid: 2002001032582004939
- rid: 2002001032582004940
- rid: 2002001032582004941
- rid: 2002001032582004942
- rid: 2002001080785829982
- rid: 2002001080785829983
- rid: 2002001080785829984
- rid: 2002001080785829985
- rid: 2002001080785829986
- rid: 2002001080785829987
- rid: 6852985685364965392
- rid: 2002001032582004943
- rid: 2002001080785829988
- rid: 6852985685364965394
- rid: 8712630790384254976
- rid: 4726762159971237888
- rid: 2002001032582004944
- rid: 2002001080785829989
m_RuntimeSettings:
m_List:
- rid: 6852985685364965378
@ -97,14 +97,14 @@ MonoBehaviour:
references:
version: 2
RefIds:
- rid: 2002001032582004933
- rid: 2002001080785829978
type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
m_StripUnusedPostProcessingVariants: 1
m_StripUnusedVariants: 1
m_StripScreenCoordOverrideVariants: 1
- rid: 2002001032582004934
- rid: 2002001080785829979
type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3}
@ -116,7 +116,7 @@ MonoBehaviour:
m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3}
m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3}
m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3}
- rid: 2002001032582004935
- rid: 2002001080785829980
type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_Version: 0
@ -131,7 +131,7 @@ MonoBehaviour:
m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2}
- rid: 2002001032582004936
- rid: 2002001080785829981
type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
@ -140,7 +140,7 @@ MonoBehaviour:
m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2}
m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2}
- rid: 2002001032582004937
- rid: 2002001080785829982
type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime}
data:
m_Version: 0
@ -153,13 +153,13 @@ MonoBehaviour:
m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3}
m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3}
m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3}
- rid: 2002001032582004938
- rid: 2002001080785829983
type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3}
m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3}
m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3}
- rid: 2002001032582004939
- rid: 2002001080785829984
type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -172,12 +172,12 @@ MonoBehaviour:
skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3}
renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3}
- rid: 2002001032582004940
- rid: 2002001080785829985
type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
m_ProbeVolumeDisableStreamingAssets: 0
- rid: 2002001032582004941
- rid: 2002001080785829986
type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
@ -187,21 +187,21 @@ MonoBehaviour:
probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3}
probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3}
numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3}
- rid: 2002001032582004942
- rid: 2002001080785829987
type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_version: 0
m_IncludeReferencedInScenes: 0
m_IncludeAssetsByLabel: 0
m_LabelToInclude:
- rid: 2002001032582004943
- rid: 2002001080785829988
type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime}
data:
m_Version: 1
probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3}
probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3}
probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3}
- rid: 2002001032582004944
- rid: 2002001080785829989
type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime}
data:
m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2}

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 3c7a673527c475792805182eb5225d41
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Sounds/Music.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4eb50d7f8bd8ea63bafbc2cb0dcfbd04
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 61c08e4dfdffc56868f82a9550745292
AudioImporter:
externalObjects: {}
serializedVersion: 8
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,17 +1,24 @@
using UnityEngine;
using TMPro;
[RequireComponent(typeof(AudioSource))]
public class PlaySoundEvent : MonoBehaviour
{
[SerializeField] private AudioClip soundClip; // Assign the sound clip in the inspector
[SerializeField] private float volume = 1f;
[SerializeField] private float delaySeconds = 0f;
public TMP_Text interactionPrompt;
void DestroyObj()
{
Destroy(gameObject);
}
void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player")) // Assuming the player has the tag "Player"
{
PlaySound();
Destroy(gameObject); // Remove the trigger
Invoke("PlaySound", delaySeconds); // Play the sound after the delay
Invoke("DestroyObj", delaySeconds + 0.1f); // Destroy the object after the delay
}
}
@ -19,7 +26,8 @@ public class PlaySoundEvent : MonoBehaviour
{
if (soundClip != null)
{
SoundFXManager.instance.PlaySound(soundClip, transform, 1f);
Debug.Log("Playing sound: " + soundClip.name);
SoundFXManager.instance.PlaySound(soundClip, transform, volume);
}
}
}

View File

@ -118,7 +118,46 @@ AnimationClip:
m_PostInfinity: 2
m_RotationOrder: 4
path:
m_FloatCurves: []
m_FloatCurves:
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1.0166667
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 65
script: {fileID: 0}
flags: 0
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
@ -154,6 +193,15 @@ AnimationClip:
isPPtrCurve: 0
isIntCurve: 0
isSerializeReferenceCurve: 0
- serializedVersion: 2
path: 0
attribute: 3305885265
script: {fileID: 0}
typeID: 65
customType: 0
isPPtrCurve: 0
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
@ -527,6 +575,45 @@ AnimationClip:
classID: 4
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 0.016666668
value: 0
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1.0166667
value: 1
inSlope: Infinity
outSlope: Infinity
tangentMode: 103
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Enabled
path:
classID: 65
script: {fileID: 0}
flags: 0
m_EulerEditorCurves:
- serializedVersion: 2
curve:

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 79cdd13ab4332fc22b77c009426ad155
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
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: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,227 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TabletBounce
serializedVersion: 7
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchoredPosition.x
path:
classID: 224
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 64.99
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 104.8
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 64.99
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchoredPosition.y
path:
classID: 224
script: {fileID: 0}
flags: 0
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings:
- serializedVersion: 2
path: 0
attribute: 538195251
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
isIntCurve: 0
isSerializeReferenceCurve: 0
- serializedVersion: 2
path: 0
attribute: 1460864421
script: {fileID: 0}
typeID: 224
customType: 28
isPPtrCurve: 0
isIntCurve: 0
isSerializeReferenceCurve: 0
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: -138.10999
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchoredPosition.x
path:
classID: 224
script: {fileID: 0}
flags: 0
- serializedVersion: 2
curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 64.99
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 0.5
value: 104.8
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 64.99
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_AnchoredPosition.y
path:
classID: 224
script: {fileID: 0}
flags: 0
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 37fd1c0eb89340706b80936fa728d803
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,72 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1107 &-7781547154647490003
AnimatorStateMachine:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 6918459072230565575}
m_Position: {x: 200, y: 0, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 6918459072230565575}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TabletIcon
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -7781547154647490003}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &6918459072230565575
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: TabletBounce
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 37fd1c0eb89340706b80936fa728d803, type: 2}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4a1d1483c71851686a4976093e254d56
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -20,6 +20,9 @@ EditorBuildSettings:
- enabled: 0
path: Assets/Scenes/SampleScene.unity
guid: 99c9720ab356a0642a771bea13969a05
- enabled: 1
path: Assets/Scenes/level2.unity
guid: 2ae7d18dd781336fb8df1faeeb148407
m_configObjects:
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
m_UseUCBPForAssetBundles: 0