Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Wintersemester 2018-2019
Unity
Suck It
Commits
5030df32
Commit
5030df32
authored
Mar 30, 2019
by
mthiele2
Browse files
Wasser-ATTACKEN FICK SCHEISSE FICKT EUCH
parent
c2637386
Changes
5
Hide whitespace changes
Inline
Side-by-side
Assets/_Game/Prefabs/Enemies/Wasser-Gegner.prefab
View file @
5030df32
...
@@ -274,7 +274,7 @@ Transform:
...
@@ -274,7 +274,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
8757578769013443562
}
m_GameObject
:
{
fileID
:
8757578769013443562
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0.
253
,
y
:
-0.30
9
,
z
:
0
}
m_LocalPosition
:
{
x
:
0.
117
,
y
:
-0.30
2
,
z
:
0
}
m_LocalScale
:
{
x
:
0.3846154
,
y
:
0.3846154
,
z
:
0.3846154
}
m_LocalScale
:
{
x
:
0.3846154
,
y
:
0.3846154
,
z
:
0.3846154
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
4738352637052488
}
m_Father
:
{
fileID
:
4738352637052488
}
...
...
Assets/_Game/Prefabs/Enemy Attacks/Enemy_WaterAttack.prefab
View file @
5030df32
...
@@ -14,9 +14,9 @@ GameObject:
...
@@ -14,9 +14,9 @@ GameObject:
-
component
:
{
fileID
:
7928429373142515012
}
-
component
:
{
fileID
:
7928429373142515012
}
-
component
:
{
fileID
:
8237559276284760939
}
-
component
:
{
fileID
:
8237559276284760939
}
-
component
:
{
fileID
:
5473739827322462943
}
-
component
:
{
fileID
:
5473739827322462943
}
m_Layer
:
12
m_Layer
:
0
m_Name
:
Enemy_WaterAttack
m_Name
:
Enemy_WaterAttack
m_TagString
:
Water
m_TagString
:
EnemyShot
m_Icon
:
{
fileID
:
0
}
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_StaticEditorFlags
:
0
...
@@ -29,7 +29,7 @@ Transform:
...
@@ -29,7 +29,7 @@ Transform:
m_PrefabAsset
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
7588789901055592565
}
m_GameObject
:
{
fileID
:
7588789901055592565
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalRotation
:
{
x
:
0
,
y
:
0
,
z
:
0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
-1
}
m_LocalScale
:
{
x
:
6
,
y
:
6
,
z
:
1
}
m_LocalScale
:
{
x
:
6
,
y
:
6
,
z
:
1
}
m_Children
:
[]
m_Children
:
[]
m_Father
:
{
fileID
:
0
}
m_Father
:
{
fileID
:
0
}
...
@@ -95,7 +95,7 @@ Rigidbody2D:
...
@@ -95,7 +95,7 @@ Rigidbody2D:
m_Simulated
:
1
m_Simulated
:
1
m_UseFullKinematicContacts
:
0
m_UseFullKinematicContacts
:
0
m_UseAutoMass
:
0
m_UseAutoMass
:
0
m_Mass
:
1
m_Mass
:
3
m_LinearDrag
:
0
m_LinearDrag
:
0
m_AngularDrag
:
0.05
m_AngularDrag
:
0.05
m_GravityScale
:
3
m_GravityScale
:
3
...
@@ -133,7 +133,7 @@ CapsuleCollider2D:
...
@@ -133,7 +133,7 @@ CapsuleCollider2D:
m_Enabled
:
1
m_Enabled
:
1
m_Density
:
1
m_Density
:
1
m_Material
:
{
fileID
:
0
}
m_Material
:
{
fileID
:
0
}
m_IsTrigger
:
0
m_IsTrigger
:
1
m_UsedByEffector
:
0
m_UsedByEffector
:
0
m_UsedByComposite
:
0
m_UsedByComposite
:
0
m_Offset
:
{
x
:
-0.008341174
,
y
:
-0.00032437945
}
m_Offset
:
{
x
:
-0.008341174
,
y
:
-0.00032437945
}
...
...
Assets/_Game/Scenes/Max-Level.unity
View file @
5030df32
...
@@ -23276,7 +23276,7 @@ PrefabInstance:
...
@@ -23276,7 +23276,7 @@ PrefabInstance:
type: 3}
type: 3}
propertyPath: button
propertyPath: button
value:
value:
objectReference: {fileID:
1858996996
}
objectReference: {fileID:
0
}
m_RemovedComponents: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3ff4cf871f5edaa40b0530c80a9ff9df, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 3ff4cf871f5edaa40b0530c80a9ff9df, type: 3}
--- !u!1 &1373053034
--- !u!1 &1373053034
...
@@ -32640,12 +32640,12 @@ PrefabInstance:
...
@@ -32640,12 +32640,12 @@ PrefabInstance:
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
type: 3}
propertyPath: m_LocalPosition.x
propertyPath: m_LocalPosition.x
value: -
39.7
value: -
21.5
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
type: 3}
propertyPath: m_LocalPosition.y
propertyPath: m_LocalPosition.y
value:
51
.5
value:
48
.5
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
- target: {fileID: 52145075018362285, guid: 2e3528907311e438dab0d393127aa332,
type: 3}
type: 3}
...
@@ -34650,18 +34650,6 @@ PrefabInstance:
...
@@ -34650,18 +34650,6 @@ PrefabInstance:
objectReference: {fileID: 0}
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 49ad5eee708571d449789cb994b54fcb, type: 3}
--- !u!114 &1858996996 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5970381992757526481, guid: 50a0ddec8ac259c46a58a6b5324a759d,
type: 3}
m_PrefabInstance: {fileID: 1777049076}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1864783512
--- !u!1001 &1864783512
PrefabInstance:
PrefabInstance:
m_ObjectHideFlags: 0
m_ObjectHideFlags: 0
Assets/_Game/Scripts/Enemy AI/Water/AI_WaterAttack.cs
View file @
5030df32
...
@@ -66,14 +66,9 @@ public class AI_WaterAttack : WeightedAction
...
@@ -66,14 +66,9 @@ public class AI_WaterAttack : WeightedAction
launchPower
+=
3
;
launchPower
+=
3
;
GameObject
projectile
=
Instantiate
(
fireBall
,
shotspawn
.
position
,
shotspawn
.
rotation
);
GameObject
projectile
=
Instantiate
(
fireBall
,
shotspawn
.
position
,
shotspawn
.
rotation
);
projectile
.
GetComponent
<
AI_WaterProjectile
>().
setValues
(
damage
,
destroyTime
,
thrust
);
projectile
.
GetComponent
<
AI_WaterProjectile
>().
setValues
(
damage
,
destroyTime
,
thrust
);
if
(
player
.
transform
.
position
.
x
>
this
.
transform
.
position
.
x
)
Vector3
dir
=
player
.
transform
.
position
-
projectile
.
transform
.
position
;
{
dir
.
Normalize
();
projectile
.
GetComponent
<
Rigidbody2D
>().
velocity
=
new
Vector2
(
launchPower
,
launchPower
/
2
);
projectile
.
GetComponent
<
Rigidbody2D
>().
velocity
=
dir
*
launchPower
;
}
else
{
projectile
.
GetComponent
<
Rigidbody2D
>().
velocity
=
new
Vector2
(-
launchPower
,
launchPower
/
2
);
}
yield
return
new
WaitForSeconds
(
attackSpeed
);
yield
return
new
WaitForSeconds
(
attackSpeed
);
}
}
}
}
...
...
Assets/_Game/Scripts/Enemy AI/Water/AI_WaterProjectile.cs
View file @
5030df32
...
@@ -13,10 +13,7 @@ public class AI_WaterProjectile : MonoBehaviour
...
@@ -13,10 +13,7 @@ public class AI_WaterProjectile : MonoBehaviour
private
void
OnTriggerEnter2D
(
Collider2D
other
)
private
void
OnTriggerEnter2D
(
Collider2D
other
)
{
{
if
(
other
.
CompareTag
(
"EnemyShot"
)
||
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Ground"
)
||
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Enemy"
))
print
(
other
.
name
);
{
return
;
}
if
(
other
.
CompareTag
(
"Player"
))
if
(
other
.
CompareTag
(
"Player"
))
{
{
Vector2
dir
=
new
Vector2
(
other
.
GetComponentInParent
<
Transform
>().
position
.
x
-
transform
.
position
.
x
,
0
);
Vector2
dir
=
new
Vector2
(
other
.
GetComponentInParent
<
Transform
>().
position
.
x
-
transform
.
position
.
x
,
0
);
...
@@ -25,8 +22,7 @@ public class AI_WaterProjectile : MonoBehaviour
...
@@ -25,8 +22,7 @@ public class AI_WaterProjectile : MonoBehaviour
other
.
attachedRigidbody
.
AddForce
(
dir
,
ForceMode2D
.
Impulse
);
other
.
attachedRigidbody
.
AddForce
(
dir
,
ForceMode2D
.
Impulse
);
other
.
GetComponentInParent
<
Life
>().
Damage
(
damage
);
other
.
GetComponentInParent
<
Life
>().
Damage
(
damage
);
}
}
Debug
.
Log
(
"test"
);
if
(
other
.
gameObject
.
layer
==
LayerMask
.
NameToLayer
(
"Ground"
)
||
other
.
CompareTag
(
"EnemyShot"
))
Destroy
();
Destroy
();
}
}
public
void
setValues
(
int
damage
,
float
destroyTime
,
float
thrust
)
public
void
setValues
(
int
damage
,
float
destroyTime
,
float
thrust
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment