Skip to content

Commit

Permalink
Merge pull request #27 from NewNotMoon/develop
Browse files Browse the repository at this point in the history
2pが切りつけすると位置が戻らないバグ修正/ガードを突きで崩すとエフェクトが消えないバグ修正
  • Loading branch information
NewNotMoon committed Mar 7, 2016
2 parents 1d64eff + e437446 commit 8dcd4ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Classes/c2xa/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ void player::judge()
}
getParent()->addChild( eff, 30 );
} ),
MoveTo::create( 0.4f, pos_1p ),
MoveTo::create( 0.4f, number_ == number::_1p ? pos_1p : pos_2p ),
CallFunc::create( [ this, droid_ ]{
is_doing_ = false;
is_attacking_ = false;
Expand All @@ -456,6 +456,7 @@ void player::judge()
case action::guard:
{
auto adf = ParticleSystemQuad::create( "particle/adfield.plist" );
adf->setName( "adf" );
adf->setPosition( droid_->getPosition() + Vec2{ number_ == number::_1p ? 200.f : -200.f, 0.f } );
adf->resetSystem();
addChild( adf, 40 );
Expand Down Expand Up @@ -489,6 +490,11 @@ void player::damage( int dm_ )

auto droid_ = static_cast<cocos2d::Sprite*>( getChildByName( "droid" ) );
droid_->stopAllActions();
auto adf_ = static_cast<cocos2d::ParticleSystemQuad*>( getChildByName( "adf" ) );
if( adf_ )
{
adf_->removeFromParent();
}
auto a_ = RepeatForever::create( Animate::create( create_animation( "droid/idle/%d.png", "default", 0, 11, true ) ) );
a_->setTag( 100 );
droid_->runAction( a_ );
Expand Down

0 comments on commit 8dcd4ca

Please sign in to comment.