religion/Assets/Prefabs/爱欲品.prefab
Roman 37ccc08c85 任务:搭建基本的系统
1.编写塞钱箱逻辑
(1.初始为有钱
(2.创建事件,当被塞钱,修改塞钱箱状态
(3.创建事件,当被拿钱,修改塞钱箱状态
(*:修改塞钱箱继承自普通可交互物体

2.编写玩家塞钱逻辑
(1.创建交互按键,当检测到交互执行,执行所catch物体的OnCall,根据所catch物体不同触发不同的动作。当catch到的是塞钱箱,执行塞钱功能
(2.创建塞钱功能,持有特殊金币-1

3.修改爱欲品掉钱逻辑
(1.修改死亡事件,当检测到主人为地藏并且玩家身上已经没钱了的时候,生成一个特殊硬币

4.编写特殊硬币逻辑
(1.继承于可交互物体(×)
(2.OnCall的时候触发玩家加钱功能
(3.物理层上不与除地面以外的其他东西碰撞
(4.捡拾上,给硬币添加一个子物体,通过子物体上的触发器和攻击类来判断捡拾与否

5.编写地藏拿钱攻击逻辑
(*.参照钟的逻辑
(1.新建地藏手
(2.新建组件:地藏手
(3.收到攻击信号后,从外部从上至下伸入一只手,伴随抖动,到一定位置后停止
(4.手有碰撞体,触碰到玩家时,对玩家造成伤害
(5.抄一段普通怪物的受击逻辑,当手被攻击了,触发动画,稍微抬起一小段,并且剧烈震动,同时通知主人被打

6.整理脚本

至此,关卡已经能按照正常的逻辑跑起来了
2021-12-11 02:12:12 +08:00

314 lines
7.5 KiB
Plaintext

%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7746389308535175434
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7746389308535175438}
- component: {fileID: 7746389308535175433}
- component: {fileID: 7746389308535175432}
- component: {fileID: 7746389308535175435}
- component: {fileID: 7746389308535175439}
- component: {fileID: 7746389308535175436}
- component: {fileID: 7746389308535175437}
m_Layer: 0
m_Name: "\u7231\u6B32\u54C1"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7746389308535175438
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 11.457179, y: 0.283, z: 0}
m_LocalScale: {x: -1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &7746389308535175433
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 4b64b4c73bfa00a4a9552c672359f9fc, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!61 &7746389308535175432
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 0.768, y: 0.74}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 0.768, y: 0.74}
m_EdgeRadius: 0
--- !u!61 &7746389308535175435
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: -1.52, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 0.768, y: 0.74}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 2.27, y: 0.74}
m_EdgeRadius: 0
--- !u!50 &7746389308535175439
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!114 &7746389308535175436
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -333801856, guid: aa0b1eebb5db27a419fa4564bbe5c9c5, type: 3}
m_Name:
m_EditorClassIdentifier:
updateType: 0
isSpeedBased: 0
hasOnStart: 0
hasOnPlay: 0
hasOnUpdate: 0
hasOnStepComplete: 0
hasOnComplete: 0
hasOnTweenCreated: 0
hasOnRewind: 0
onStart:
m_PersistentCalls:
m_Calls: []
onPlay:
m_PersistentCalls:
m_Calls: []
onUpdate:
m_PersistentCalls:
m_Calls: []
onStepComplete:
m_PersistentCalls:
m_Calls: []
onComplete:
m_PersistentCalls:
m_Calls: []
onTweenCreated:
m_PersistentCalls:
m_Calls: []
onRewind:
m_PersistentCalls:
m_Calls: []
delay: 0
duration: 5
easeType: 1
easeCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
loops: -1
id:
loopType: 0
orientType: 1
lookAtTransform: {fileID: 0}
lookAtPosition: {x: 0, y: 0, z: 0}
lookAhead: 0
autoPlay: 1
autoKill: 1
relative: 0
isLocal: 0
isClosedPath: 1
pathResolution: 10
pathMode: 3
lockRotation: 0
assignForwardAndUp: 0
forwardDirection: {x: 0, y: 0, z: 1}
upDirection: {x: 0, y: 1, z: 0}
tweenRigidbody: 0
wps: []
fullWps: []
path:
wpLengths:
- 0
- 3.7057567
- 3.7057567
wps:
- {x: 11.457179, y: 0.283, z: 0}
- {x: 15.16288, y: 0.30334127, z: 0}
- {x: 11.457179, y: 0.283, z: 0}
type: 0
subdivisionsXSegment: 10
subdivisions: 30
controlPoints: []
length: 7.4115133
isFinalized: 1
timesTable:
- 0
- 0.5
- 1
lengthsTable: []
inspectorMode: 0
pathType: 0
handlesType: 0
livePreview: 1
handlesDrawMode: 0
perspectiveHandleSize: 0.5
showIndexes: 1
showWpLength: 0
pathColor: {r: 1, g: 1, b: 1, a: 0.5}
lastSrcPosition: {x: 11.457179, y: 0.283, z: 0}
lastSrcRotation: {x: 0, y: 0, z: 0, w: 1}
wpsDropdown: 1
dropToFloorOffset: 0
--- !u!114 &7746389308535175437
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7746389308535175434}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f210b45e49a9b004da5dff2a3e6278d8, type: 3}
m_Name:
m_EditorClassIdentifier:
HP: 3
ATK: 1
speed: 1
coin: 0
canBeHit: 1
state: 0
HPLeft: 0
hitToflyParameter: {x: 3, y: 3}
deadRotationRangeMax: 500
deadRotationRangeMin: 500
inPath: 1
catchOffset: {x: 0, y: 0, z: 0}
breakFreeCount: 5
breakFreeCountLeft: 0
hasOwner: 0
coinObj: {fileID: 2312258847787666435, guid: 012ab20ff74f1af4e802d80157b4b4e0, type: 3}