Skip to content

Commit

Permalink
Merge branch 'master' of github.com:GameEgg/STARPOO-II
Browse files Browse the repository at this point in the history
  • Loading branch information
km9173 committed Jan 23, 2017
2 parents 59c9d42 + 02d062c commit 14782ca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Assets/Prefabs/Game/ShipRenderer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ Transform:
m_GameObject: {fileID: 1298466188941236}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 7.7, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children: []
m_Father: {fileID: 4456669334348854}
m_RootOrder: 4
Expand Down Expand Up @@ -6660,8 +6660,8 @@ ParticleSystem:
minMaxState: 0
moveWithTransform: 1
moveWithCustomTransform: {fileID: 0}
scalingMode: 1
randomSeed: 2135685641
scalingMode: 0
randomSeed: -2146223951
InitialModule:
serializedVersion: 3
enabled: 1
Expand Down Expand Up @@ -14509,8 +14509,8 @@ ParticleSystemRenderer:
m_MinParticleSize: 0
m_MaxParticleSize: 0.5
m_CameraVelocityScale: 0
m_VelocityScale: 0.05
m_LengthScale: 0
m_VelocityScale: 0
m_LengthScale: 3.6
m_SortingFudge: 0
m_NormalDirection: 1
m_RenderAlignment: 0
Expand Down
18 changes: 13 additions & 5 deletions Assets/Scripts/Game/ShipRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,14 @@ void Alive(bool alive)
}
}

void Shooted(Vector2 pos)
void Shooted(Vector2 pos){
StartCoroutine(Shooted2(pos));
}

IEnumerator Shooted2(Vector2 pos)
{
yield return null;

foreach (var p in chargingParticles)
{
p.gameObject.SetActive(false);
Expand All @@ -127,14 +133,16 @@ void Shooted(Vector2 pos)

var rad = _ship.shootingRad;
var direction = new Vector3(Mathf.Cos(rad), Mathf.Sin(rad),0);
laser.Show(transform.position + direction * 2, pos, _ship.shootingPower);

laser.Show(transform.position + direction * 30, pos, _ship.shootingPower);

yield return null;
yield return null;
/*
foreach (var p in laserHitParticles)
{
p.transform.position = new Vector3(pos.x,pos.y,0) - direction*2;
p.transform.position = new Vector3(pos.x,pos.y,0) - direction*18;
p.Play();
}
}*/
}

void IsCharging(bool value)
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Game/ShipUpdator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public override void GameUpdate()
{
if (_ship.alive.value)
{
UpdateShooting();
UpdateRotation();
UpdatePosition();
UpdateShooting();
CheckDead();
}
else
Expand Down

0 comments on commit 14782ca

Please sign in to comment.