Blocked Cave

Minor fixes
This commit is contained in:
KrolMel 2023-01-15 23:28:30 +01:00
parent 318a38a140
commit 4dcb6c0aca
9 changed files with 73 additions and 14 deletions

View File

@ -36,7 +36,6 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.5, y: 75, z: 10} m_LocalPosition: {x: -2.5, y: 75, z: 10}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
@ -52,7 +51,6 @@ SpriteRenderer:
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1
@ -218,7 +216,7 @@ MonoBehaviour:
state: 0 state: 0
--- !u!95 &-4365747932373452915 --- !u!95 &-4365747932373452915
Animator: Animator:
serializedVersion: 4 serializedVersion: 3
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
@ -231,7 +229,6 @@ Animator:
m_UpdateMode: 0 m_UpdateMode: 0
m_ApplyRootMotion: 0 m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0 m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage: m_WarningMessage:
m_HasTransformHierarchy: 1 m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1

View File

@ -112619,7 +112619,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1051807162 --- !u!1 &1051807162
GameObject: GameObject:
@ -213681,6 +213681,7 @@ GameObject:
- component: {fileID: 1648011593} - component: {fileID: 1648011593}
- component: {fileID: 1648011592} - component: {fileID: 1648011592}
- component: {fileID: 1648011591} - component: {fileID: 1648011591}
- component: {fileID: 1648011596}
m_Layer: 0 m_Layer: 0
m_Name: GatewayCave m_Name: GatewayCave
m_TagString: SceneTransition m_TagString: SceneTransition
@ -213707,7 +213708,7 @@ MonoBehaviour:
coords: {x: 0.55, y: -10.48, z: 10} coords: {x: 0.55, y: -10.48, z: 10}
nextMapName: TheCave nextMapName: TheCave
respawnCoords: {x: 0, y: -4.5, z: 10} respawnCoords: {x: 0, y: -4.5, z: 10}
isEnabled: 1 isEnabled: 0
--- !u!114 &1648011592 --- !u!114 &1648011592
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -213781,6 +213782,18 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1648011596
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1648011590}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1bd8ee02841a105459bad8be2907ea3c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1650688809 --- !u!1 &1650688809
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -219161,7 +219174,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3} - target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 7 value: 6
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3} - target: {fileID: 3079617781123838030, guid: 6b44df46620f48f41903e7858379f704, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x

View File

@ -3004,7 +3004,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0 m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1 m_useMaxVisibleDescender: 1
m_pageToDisplay: 1 m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0} m_margin: {x: -0.5287826, y: 0, z: -0.63047147, w: 0}
m_isUsingLegacyAnimationComponent: 0 m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0 m_isVolumetricText: 0
m_hasFontAssetChanged: 0 m_hasFontAssetChanged: 0

View File

@ -2961,7 +2961,10 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1126efb434c50f446b49891f5584c786, type: 3} m_Script: {fileID: 11500000, guid: 1126efb434c50f446b49891f5584c786, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
ElementsToBuildOnSceneList: [] ElementsToBuildOnSceneList:
- Key: 2
Value:
EquippableItem: {fileID: 11400000, guid: c96390ceb0786494db5919aaad6a06be, type: 2}
convertedData: [] convertedData: []
--- !u!1 &157618775 --- !u!1 &157618775
GameObject: GameObject:

View File

@ -2233,15 +2233,15 @@ Rigidbody2D:
m_Simulated: 1 m_Simulated: 1
m_UseFullKinematicContacts: 0 m_UseFullKinematicContacts: 0
m_UseAutoMass: 0 m_UseAutoMass: 0
m_Mass: 10 m_Mass: 500
m_LinearDrag: 5 m_LinearDrag: 50
m_AngularDrag: 0.05 m_AngularDrag: 1
m_GravityScale: 0 m_GravityScale: 0
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Interpolate: 0 m_Interpolate: 0
m_SleepingMode: 1 m_SleepingMode: 1
m_CollisionDetection: 0 m_CollisionDetection: 0
m_Constraints: 0 m_Constraints: 7
--- !u!61 &190767208 --- !u!61 &190767208
BoxCollider2D: BoxCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -91,7 +91,8 @@ public class BossThug : MonoBehaviour
private void ActivateKillingMode() private void ActivateKillingMode()
{ {
// set lower radious in order to less attack distance // set lower radious in order to less attack distance
gameObject.GetComponent<CircleCollider2D>().radius = 2f; gameObject.GetComponent<CircleCollider2D>().radius = 1f;
Debug.Log(gameObject.GetComponent<CircleCollider2D>().radius);
gameObject.GetComponent<FollowingEnemy>().enabled=true; gameObject.GetComponent<FollowingEnemy>().enabled=true;
animator.runtimeAnimatorController = Resources.Load("SampleScene/Enemies/BossThugAnimator.controller") as RuntimeAnimatorController; animator.runtimeAnimatorController = Resources.Load("SampleScene/Enemies/BossThugAnimator.controller") as RuntimeAnimatorController;

View File

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

View File

@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CaveBlocking : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
if (InventoryUIManager.Instance.FindItemInWarehouseByName("ScrollOfDarkness").Count > 0)
{
if (gameObject.GetComponent<DoorBehaviour>())
gameObject.GetComponent<DoorBehaviour>().isEnabled = true;
if (gameObject.GetComponent<AnimatedDoorBehaviour>())
gameObject.GetComponent<AnimatedDoorBehaviour>().isEnabled = true;
}
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1bd8ee02841a105459bad8be2907ea3c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: