Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gadig
four
Commits
269232c6
Commit
269232c6
authored
Nov 03, 2016
by
Jordan McKenney
Browse files
Merge branch 'character' of git.gmu.edu:gadig/four into character
parents
5ab16613
15e510cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Assets/prefabs/Player.prefab
View file @
269232c6
No preview for this file type
Assets/scene/player_animation_test.unity
View file @
269232c6
No preview for this file type
Assets/script/WalkParticles.cs
View file @
269232c6
using
UnityEngine
;
using
UnityEngine
;
using
System.Collections
;
using
System.Collections
;
public
class
WalkParticles
:
MonoBehaviour
{
public
class
WalkParticles
:
MonoBehaviour
{
private
ParticleSystem
ps
;
private
ParticleSystem
ps
;
private
ParticleSystem
.
EmissionModule
module
;
private
ParticleSystem
.
EmissionModule
module
;
private
HeroMobility
hm
;
private
HeroMobility
hm
;
public
float
speedThreshold
=
0.001f
;
// Use this for initialization
void
Start
()
{
// Use this for initialization
ps
=
GetComponentInChildren
<
ParticleSystem
>();
void
Start
()
{
module
=
ps
.
emission
;
ps
=
GetComponentInChildren
<
ParticleSystem
>();
hm
=
GetComponent
<
HeroMobility
>();
module
=
ps
.
emission
;
}
hm
=
GetComponent
<
HeroMobility
>();
}
// Update is called once per frame
void
LateUpdate
()
{
// Update is called once per frame
if
(
hm
.
deltaPos
.
sqrMagnitude
>
0
)
{
void
LateUpdate
()
{
if
(!
ps
.
isPlaying
)
{
if
(
hm
.
deltaPos
.
sqrMagnitude
>
speedThreshold
)
{
ps
.
Simulate
(
0.0f
,
true
,
false
);
if
(!
ps
.
isPlaying
)
{
module
.
enabled
=
true
;
ps
.
Simulate
(
0.0f
,
true
,
false
);
ps
.
Play
();
module
.
enabled
=
true
;
}
ps
.
Play
();
}
else
{
}
if
(
ps
.
isPlaying
)
{
}
else
{
module
.
enabled
=
false
;
if
(
ps
.
isPlaying
)
{
ps
.
Stop
();
module
.
enabled
=
false
;
}
ps
.
Stop
();
}
}
}
}
}
}
}
Assets/sprite/animation/Player/Player.controller
View file @
269232c6
No preview for this file type
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