void Win1() { Player _player = GameScene.gameScene.player.GetComponent<Player>(); if(_player.GetComponent<Translation>().AtDestination() ) { m_winSequence = new WinSequence(Win2); } }
void Win1() { float _rankPercent = (float)m_totalScore / (float)m_rankingScore; if (_rankPercent >= 0 && _rankPercent <= 0.2f) m_rank.text = " D"; if (_rankPercent >= 0.2f && _rankPercent <= 0.6f) m_rank.text = " C"; if (_rankPercent >= 0.6f && _rankPercent < 1.0f) m_rank.text = " B"; if (_rankPercent >= 1.0f) m_rank.text = " A"; m_winSequence = new WinSequence(Win2); }
void Win0() { Player _player = GameScene.gameScene.player.GetComponent<Player>(); if (_player.IsOnGround() ) { Vector2 _pos = _player.transform.position; Vector2 _dest = new Vector2(_pos.x, _pos.y + 2.0f); _player.GetComponent<Translation>().SetTranslate(_pos, _dest); m_winSequence = new WinSequence(Win1); } }
void Win0() { timer += Time.deltaTime; if (timer >= delay && m_count < DataControl.control.levelData.scoreSoulFragments) { GameObject soulFragment = (GameObject)Instantiate(p_soulFragment, p_player.transform.position, p_player.transform.rotation); soulFragment.GetComponent<Translation>().SetTranslate(transform.position, m_percentage.transform.position); timer = 0; m_count += 1; m_totalScore += 15 * m_count; } if (m_count >= DataControl.control.levelData.scoreSoulFragments) { m_winSequence = new WinSequence(Win1); } }
// Use this for initialization void Start() { m_totalScore = DataControl.control.levelData.score; m_winSequence = new WinSequence( Win0); }
void Win2() { timer += Time.deltaTime; Player _player = GameScene.gameScene.player.GetComponent<Player>(); if (timer >= delay && m_count < nDATACONTROL.DataControl.control.levelData.scoreSoulFragments) { float radius = 15.0f; float _xRand = Random.RandomRange(-1.0f, 1.0f); float _yRand = Random.RandomRange(-1.0f, 1.0f); GameObject soulFragment = (GameObject)Instantiate(p_soulFragment, _player.transform.position, _player.transform.rotation); soulFragment.GetComponent<Translation>().SetTranslate(soulFragment.transform.position, transform.position); soulFragment.GetComponent<Translation>().m_velocity = new Vector2(_xRand * radius, _yRand * radius); timer = 0; m_count += 1; } if (m_count >= nDATACONTROL.DataControl.control.levelData.scoreSoulFragments) m_winSequence = new WinSequence(Win3 ); }
// Use this for initialization void Start() { m_winSequence = new WinSequence(Win0 ); }
void Win3() { Player _player = GameScene.gameScene.player.GetComponent<Player>(); _player.SetState(nENTITY.State.ALIVE, ref _player.m_state); _player.disableControl = false; FollowCamera.control.gameObject.GetComponent<FollowCamera>().followObject = goal; goal.GetComponent<Goal>().OpenDoor(); m_winSequence = new WinSequence(WinEnd); }