Skip to content

Commit 056f083

Browse files
committed
hardcoding things because unity doesn't give us another choice
we would do it in a way that we don't need to copy the data manually, but that would require more time than what we have.
1 parent cffd062 commit 056f083

16 files changed

Lines changed: 445 additions & 34 deletions

MagicalMuffin-Prototype/Assets/Geralt/AnimationsFinal/yyy.fbx.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MagicalMuffin-Prototype/Assets/Prefabs/Ghoul.prefab

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ GameObject:
1313
- component: {fileID: 8218190257962187323}
1414
- component: {fileID: 4717637874808829394}
1515
- component: {fileID: 2249711871734397663}
16+
- component: {fileID: 5431766761034115632}
1617
m_Layer: 0
1718
m_Name: Ghoul
1819
m_TagString: Ghoul
@@ -91,6 +92,102 @@ CapsuleCollider:
9192
m_Height: 3
9293
m_Direction: 1
9394
m_Center: {x: 0, y: 1.5, z: 0}
95+
--- !u!82 &5431766761034115632
96+
AudioSource:
97+
m_ObjectHideFlags: 0
98+
m_CorrespondingSourceObject: {fileID: 0}
99+
m_PrefabInstance: {fileID: 0}
100+
m_PrefabAsset: {fileID: 0}
101+
m_GameObject: {fileID: 8218190257962187325}
102+
m_Enabled: 1
103+
serializedVersion: 4
104+
OutputAudioMixerGroup: {fileID: 0}
105+
m_audioClip: {fileID: 8300000, guid: 96e478b0718ddd54e861728300f563b6, type: 3}
106+
m_PlayOnAwake: 0
107+
m_Volume: 1
108+
m_Pitch: 1
109+
Loop: 0
110+
Mute: 0
111+
Spatialize: 0
112+
SpatializePostEffects: 0
113+
Priority: 128
114+
DopplerLevel: 1
115+
MinDistance: 1
116+
MaxDistance: 500
117+
Pan2D: 0
118+
rolloffMode: 0
119+
BypassEffects: 0
120+
BypassListenerEffects: 0
121+
BypassReverbZones: 0
122+
rolloffCustomCurve:
123+
serializedVersion: 2
124+
m_Curve:
125+
- serializedVersion: 3
126+
time: 0
127+
value: 1
128+
inSlope: 0
129+
outSlope: 0
130+
tangentMode: 0
131+
weightedMode: 0
132+
inWeight: 0.33333334
133+
outWeight: 0.33333334
134+
- serializedVersion: 3
135+
time: 1
136+
value: 0
137+
inSlope: 0
138+
outSlope: 0
139+
tangentMode: 0
140+
weightedMode: 0
141+
inWeight: 0.33333334
142+
outWeight: 0.33333334
143+
m_PreInfinity: 2
144+
m_PostInfinity: 2
145+
m_RotationOrder: 4
146+
panLevelCustomCurve:
147+
serializedVersion: 2
148+
m_Curve:
149+
- serializedVersion: 3
150+
time: 0
151+
value: 0
152+
inSlope: 0
153+
outSlope: 0
154+
tangentMode: 0
155+
weightedMode: 0
156+
inWeight: 0.33333334
157+
outWeight: 0.33333334
158+
m_PreInfinity: 2
159+
m_PostInfinity: 2
160+
m_RotationOrder: 4
161+
spreadCustomCurve:
162+
serializedVersion: 2
163+
m_Curve:
164+
- serializedVersion: 3
165+
time: 0
166+
value: 0
167+
inSlope: 0
168+
outSlope: 0
169+
tangentMode: 0
170+
weightedMode: 0
171+
inWeight: 0.33333334
172+
outWeight: 0.33333334
173+
m_PreInfinity: 2
174+
m_PostInfinity: 2
175+
m_RotationOrder: 4
176+
reverbZoneMixCustomCurve:
177+
serializedVersion: 2
178+
m_Curve:
179+
- serializedVersion: 3
180+
time: 0
181+
value: 1
182+
inSlope: 0
183+
outSlope: 0
184+
tangentMode: 0
185+
weightedMode: 0
186+
inWeight: 0.33333334
187+
outWeight: 0.33333334
188+
m_PreInfinity: 2
189+
m_PostInfinity: 2
190+
m_RotationOrder: 4
94191
--- !u!1001 &5187839517237718194
95192
PrefabInstance:
96193
m_ObjectHideFlags: 0

MagicalMuffin-Prototype/Assets/Prefabs/Mutant.prefab

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ GameObject:
101101
- component: {fileID: 1794225958}
102102
- component: {fileID: 1794225963}
103103
- component: {fileID: 1652787541009597173}
104+
- component: {fileID: 5057038504899390491}
104105
m_Layer: 0
105106
m_Name: Mutant
106107
m_TagString: Untagged
@@ -183,6 +184,102 @@ CapsuleCollider:
183184
m_Height: 5
184185
m_Direction: 1
185186
m_Center: {x: 0, y: 2.5, z: 0}
187+
--- !u!82 &5057038504899390491
188+
AudioSource:
189+
m_ObjectHideFlags: 0
190+
m_CorrespondingSourceObject: {fileID: 0}
191+
m_PrefabInstance: {fileID: 0}
192+
m_PrefabAsset: {fileID: 0}
193+
m_GameObject: {fileID: 8218190257962187325}
194+
m_Enabled: 1
195+
serializedVersion: 4
196+
OutputAudioMixerGroup: {fileID: 0}
197+
m_audioClip: {fileID: 8300000, guid: 96e478b0718ddd54e861728300f563b6, type: 3}
198+
m_PlayOnAwake: 0
199+
m_Volume: 1
200+
m_Pitch: 1
201+
Loop: 0
202+
Mute: 0
203+
Spatialize: 0
204+
SpatializePostEffects: 0
205+
Priority: 128
206+
DopplerLevel: 1
207+
MinDistance: 1
208+
MaxDistance: 500
209+
Pan2D: 0
210+
rolloffMode: 0
211+
BypassEffects: 0
212+
BypassListenerEffects: 0
213+
BypassReverbZones: 0
214+
rolloffCustomCurve:
215+
serializedVersion: 2
216+
m_Curve:
217+
- serializedVersion: 3
218+
time: 0
219+
value: 1
220+
inSlope: 0
221+
outSlope: 0
222+
tangentMode: 0
223+
weightedMode: 0
224+
inWeight: 0.33333334
225+
outWeight: 0.33333334
226+
- serializedVersion: 3
227+
time: 1
228+
value: 0
229+
inSlope: 0
230+
outSlope: 0
231+
tangentMode: 0
232+
weightedMode: 0
233+
inWeight: 0.33333334
234+
outWeight: 0.33333334
235+
m_PreInfinity: 2
236+
m_PostInfinity: 2
237+
m_RotationOrder: 4
238+
panLevelCustomCurve:
239+
serializedVersion: 2
240+
m_Curve:
241+
- serializedVersion: 3
242+
time: 0
243+
value: 0
244+
inSlope: 0
245+
outSlope: 0
246+
tangentMode: 0
247+
weightedMode: 0
248+
inWeight: 0.33333334
249+
outWeight: 0.33333334
250+
m_PreInfinity: 2
251+
m_PostInfinity: 2
252+
m_RotationOrder: 4
253+
spreadCustomCurve:
254+
serializedVersion: 2
255+
m_Curve:
256+
- serializedVersion: 3
257+
time: 0
258+
value: 0
259+
inSlope: 0
260+
outSlope: 0
261+
tangentMode: 0
262+
weightedMode: 0
263+
inWeight: 0.33333334
264+
outWeight: 0.33333334
265+
m_PreInfinity: 2
266+
m_PostInfinity: 2
267+
m_RotationOrder: 4
268+
reverbZoneMixCustomCurve:
269+
serializedVersion: 2
270+
m_Curve:
271+
- serializedVersion: 3
272+
time: 0
273+
value: 1
274+
inSlope: 0
275+
outSlope: 0
276+
tangentMode: 0
277+
weightedMode: 0
278+
inWeight: 0.33333334
279+
outWeight: 0.33333334
280+
m_PreInfinity: 2
281+
m_PostInfinity: 2
282+
m_RotationOrder: 4
186283
--- !u!1001 &1906796737362536310
187284
PrefabInstance:
188285
m_ObjectHideFlags: 0

MagicalMuffin-Prototype/Assets/Prefabs/Ranger.prefab

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ GameObject:
5656
- component: {fileID: 7364707301137190745}
5757
- component: {fileID: 1957427670719076452}
5858
- component: {fileID: 6402998822057883420}
59+
- component: {fileID: -4131677676414694488}
5960
m_Layer: 0
6061
m_Name: Ranger
6162
m_TagString: Untagged
@@ -138,6 +139,102 @@ Rigidbody:
138139
m_Interpolate: 0
139140
m_Constraints: 112
140141
m_CollisionDetection: 0
142+
--- !u!82 &-4131677676414694488
143+
AudioSource:
144+
m_ObjectHideFlags: 0
145+
m_CorrespondingSourceObject: {fileID: 0}
146+
m_PrefabInstance: {fileID: 0}
147+
m_PrefabAsset: {fileID: 0}
148+
m_GameObject: {fileID: 7364707301137190748}
149+
m_Enabled: 1
150+
serializedVersion: 4
151+
OutputAudioMixerGroup: {fileID: 0}
152+
m_audioClip: {fileID: 8300000, guid: 96e478b0718ddd54e861728300f563b6, type: 3}
153+
m_PlayOnAwake: 0
154+
m_Volume: 1
155+
m_Pitch: 1
156+
Loop: 0
157+
Mute: 0
158+
Spatialize: 0
159+
SpatializePostEffects: 0
160+
Priority: 128
161+
DopplerLevel: 1
162+
MinDistance: 1
163+
MaxDistance: 500
164+
Pan2D: 0
165+
rolloffMode: 0
166+
BypassEffects: 0
167+
BypassListenerEffects: 0
168+
BypassReverbZones: 0
169+
rolloffCustomCurve:
170+
serializedVersion: 2
171+
m_Curve:
172+
- serializedVersion: 3
173+
time: 0
174+
value: 1
175+
inSlope: 0
176+
outSlope: 0
177+
tangentMode: 0
178+
weightedMode: 0
179+
inWeight: 0.33333334
180+
outWeight: 0.33333334
181+
- serializedVersion: 3
182+
time: 1
183+
value: 0
184+
inSlope: 0
185+
outSlope: 0
186+
tangentMode: 0
187+
weightedMode: 0
188+
inWeight: 0.33333334
189+
outWeight: 0.33333334
190+
m_PreInfinity: 2
191+
m_PostInfinity: 2
192+
m_RotationOrder: 4
193+
panLevelCustomCurve:
194+
serializedVersion: 2
195+
m_Curve:
196+
- serializedVersion: 3
197+
time: 0
198+
value: 0
199+
inSlope: 0
200+
outSlope: 0
201+
tangentMode: 0
202+
weightedMode: 0
203+
inWeight: 0.33333334
204+
outWeight: 0.33333334
205+
m_PreInfinity: 2
206+
m_PostInfinity: 2
207+
m_RotationOrder: 4
208+
spreadCustomCurve:
209+
serializedVersion: 2
210+
m_Curve:
211+
- serializedVersion: 3
212+
time: 0
213+
value: 0
214+
inSlope: 0
215+
outSlope: 0
216+
tangentMode: 0
217+
weightedMode: 0
218+
inWeight: 0.33333334
219+
outWeight: 0.33333334
220+
m_PreInfinity: 2
221+
m_PostInfinity: 2
222+
m_RotationOrder: 4
223+
reverbZoneMixCustomCurve:
224+
serializedVersion: 2
225+
m_Curve:
226+
- serializedVersion: 3
227+
time: 0
228+
value: 1
229+
inSlope: 0
230+
outSlope: 0
231+
tangentMode: 0
232+
weightedMode: 0
233+
inWeight: 0.33333334
234+
outWeight: 0.33333334
235+
m_PreInfinity: 2
236+
m_PostInfinity: 2
237+
m_RotationOrder: 4
141238
--- !u!95 &7933998713483055072
142239
Animator:
143240
serializedVersion: 3

MagicalMuffin-Prototype/Assets/Scripts/EnemyGhoul.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ public class EnemyGhoul : MonoBehaviour
3131
Transform Kicker;
3232
bool kicked;
3333
Vector3 KickInFront;
34+
private AudioSource audioSource;
3435

3536

3637
public ParticleSystem BloodFXParticles;
3738
void Start()
3839
{
40+
audioSource = GetComponent<AudioSource>();
3941
anim = GetComponentInChildren<Animator>();
4042
BloodFXParticles.gameObject.SetActive(false);
4143

@@ -144,6 +146,7 @@ void GetHit(float damage)
144146
BloodFXParticles.Emit(1);
145147
anim.SetBool("GetHit", true);
146148
knockback = true;
149+
audioSource.Play();
147150
if (life <= 0)
148151
{
149152
EnemyManager.EnemiesAlive.Remove(this.gameObject);
@@ -154,10 +157,10 @@ void GetHit(float damage)
154157

155158
private void OnTriggerEnter(Collider collider)
156159
{
157-
if (collider.transform.tag == "GeraldHit" || collider.transform.tag == "YenneferHit")
160+
if (collider.CompareTag("GeraldHit") || collider.CompareTag("YenneferHit"))
158161
{
159-
playerController player = collider.gameObject.GetComponentInParent<playerController>();
160-
GeraltAttacks playerCombos = collider.gameObject.GetComponentInParent<GeraltAttacks>();
162+
playerController player = collider.transform.parent.GetComponentInParent<playerController>();
163+
GeraltAttacks playerCombos = collider.transform.parent.GetComponentInParent<GeraltAttacks>();
161164

162165
float damage_recived = player.GetStrength().GetValue() * playerCombos.GetCurrentAttack().base_damage.GetValue();
163166

MagicalMuffin-Prototype/Assets/Scripts/EnemyMutant.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@ public class EnemyMutant : MonoBehaviour
3131
public float life = 50;
3232
bool knockback = false;
3333
public ParticleSystem BloodFXParticles;
34+
private AudioSource audioSource;
3435

3536
void Start()
3637
{
38+
audioSource = GetComponent<AudioSource>();
3739
BloodFXParticles.gameObject.SetActive(false);
3840

3941
ChargedJumpCollider.enabled = false;
@@ -190,6 +192,7 @@ void GetHit(float damage)
190192
BloodFXParticles.Emit(1);
191193
anim.SetBool("GetHit", true);
192194
knockback = true;
195+
audioSource.Play();
193196
if (life <= 0)
194197
{
195198
EnemyManager.EnemiesAlive.Remove(this.gameObject);

0 commit comments

Comments
 (0)