Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seedling
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tommé Nöll
seedling
Commits
58339eaf
Commit
58339eaf
authored
Oct 06, 2019
by
HelloLitty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
death animation
parent
793c69b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
18 deletions
+25
-18
Assets/Animations/Player/Sprites/death.png.meta
Assets/Animations/Player/Sprites/death.png.meta
+1
-1
Assets/Animations/Player/player.controller
Assets/Animations/Player/player.controller
+16
-10
Assets/Scripts/Player/Life.cs
Assets/Scripts/Player/Life.cs
+6
-5
ProjectSettings/ProjectVersion.txt
ProjectSettings/ProjectVersion.txt
+2
-2
No files found.
Assets/Animations/Player/Sprites/death.png.meta
View file @
58339eaf
...
...
@@ -90,7 +90,7 @@ TextureImporter:
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits:
10
0
spritePixelsToUnits:
23
0
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
...
...
Assets/Animations/Player/player.controller
View file @
58339eaf
...
...
@@ -339,49 +339,49 @@ AnimatorController:
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isJumping
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isCrouching
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isRoping
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isGrounded
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isPulling
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isDamaged
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
-
m_Name
:
isDeath
m_Type
:
4
m_DefaultFloat
:
0
m_DefaultInt
:
0
m_DefaultBool
:
0
m_Controller
:
{
fileID
:
0
}
m_Controller
:
{
fileID
:
910000
0
}
m_AnimatorLayers
:
-
serializedVersion
:
5
m_Name
:
Base Layer
...
...
@@ -711,6 +711,9 @@ AnimatorStateTransition:
-
m_ConditionMode
:
1
m_ConditionEvent
:
isDeath
m_EventTreshold
:
0
-
m_ConditionMode
:
1
m_ConditionEvent
:
isDamaged
m_EventTreshold
:
0
m_DstStateMachine
:
{
fileID
:
0
}
m_DstState
:
{
fileID
:
1683217834139844393
}
m_Solo
:
0
...
...
@@ -721,10 +724,10 @@ AnimatorStateTransition:
m_TransitionOffset
:
0
m_ExitTime
:
0
m_HasExitTime
:
0
m_HasFixedDuration
:
1
m_HasFixedDuration
:
0
m_InterruptionSource
:
0
m_OrderedInterruption
:
1
m_CanTransitionToSelf
:
1
m_CanTransitionToSelf
:
0
---
!u!1101
&6176847099265306089
AnimatorStateTransition
:
m_ObjectHideFlags
:
1
...
...
@@ -847,6 +850,9 @@ AnimatorStateTransition:
-
m_ConditionMode
:
1
m_ConditionEvent
:
isDamaged
m_EventTreshold
:
0
-
m_ConditionMode
:
2
m_ConditionEvent
:
isDeath
m_EventTreshold
:
0
m_DstStateMachine
:
{
fileID
:
0
}
m_DstState
:
{
fileID
:
-2082770153686990321
}
m_Solo
:
0
...
...
Assets/Scripts/Player/Life.cs
View file @
58339eaf
...
...
@@ -53,12 +53,13 @@ public class Life : MonoBehaviour
{
if
(
damagePossible
)
{
if
(
life
>
1
)
damagePossible
=
false
;
animator
.
SetBool
(
"isDamaged"
,
true
);
life
--;
health
.
LifeLost
(
life
);
if
(
life
>
0
)
{
damagePossible
=
false
;
animator
.
SetBool
(
"isDamaged"
,
true
);
life
--;
health
.
LifeLost
(
life
);
//die Kraft der beiden Objekte für die richtung des Knockbacks
knockback
=
other
.
transform
.
position
-
playerRigidbody
.
transform
.
position
;
playerRigidbody
.
AddForce
(
knockback
.
normalized
*
-
250f
);
...
...
ProjectSettings/ProjectVersion.txt
View file @
58339eaf
m_EditorVersion: 2019.1.
9f1
m_EditorVersionWithRevision: 2019.1.
9f1 (d5f1b37da199
)
m_EditorVersion: 2019.1.
0f2
m_EditorVersionWithRevision: 2019.1.
0f2 (292b93d75a2c
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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