override public bool Create() { if (base.Create() == false) { return(false); } m_fSpeed = 340.0f; m_stPos.y = m_fGroundY; m_eDirect = E_CSDIRECT.E_RIGHT; m_stPos.x = 460.0f; if (CSRandom.Rand(0, 100) < 50) { m_eDirect = E_CSDIRECT.E_LEFT; m_stPos.x = -460.0f; m_stScale.x = -1.0f; m_pParticle_Left.gameObject.SetActive(true); } else { m_pParticle_Right.gameObject.SetActive(true); m_fSpeed *= -1.0f; } JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_Danger(m_eDirect); StartCoroutine(Cor_CowStart()); return(true); }
E_ENEMY_CLASS SelectEnemy() { int nR = -1; for (int i = 0; i < 500; i++) { nR = CSRandom.Rand(0, m_pEnemyInfo.Count); if (JHGameData_Mng.I._GameLevelTime >= m_pEnemyInfo[nR].fStartTime && JHGameData_Mng.I._GameLevelTime < m_pEnemyInfo[nR].fEndTime) { if (CSRandom.Rand(0, 100) < m_pEnemyInfo[nR].nSpawnPersent) { if (m_pEnemyInfo[nR].nSpaceNum <= m_pEnemyInfo[nR].nCurrSpaceNum) { m_pEnemyInfo[nR].SetCurrSpaceNum(0); return(m_pEnemyInfo[nR].eClass); } else { // return E_ENEMY_CLASS.E_MAX; } } else { return(E_ENEMY_CLASS.E_MAX); } } } return(E_ENEMY_CLASS.E_MAX); }
override public bool Create() { if (base.Create() == false) { return(false); } m_fSpeed = 280.0f; m_stPos.y = m_fGroundY; m_eDirect = E_CSDIRECT.E_RIGHT; m_stPos.x = 480.0f; if (CSRandom.Rand(0, 100) < 50) { m_eDirect = E_CSDIRECT.E_LEFT; m_stPos.x = -480.0f; m_stScale.x = -1.0f; } else { m_fSpeed *= -1.0f; } JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_Danger(m_eDirect); StartCoroutine(Cor_CarStart()); return(true); }
override public void HitPlayer() { if (m_bLife == false) { return; } m_bLife = false; JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_MagicPoof(JHGame_MainLayer.I._Hero.pSrc._Position); CSSoundMng.I.Play("Hit" + CSRandom.Rand(1, 4).ToString()); CSSoundMng.I.Play("car_crash"); }
override public void HitPlayer() { if (m_bLife == false) { return; } JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_MagicPoof(m_stPos); m_bLife = false; m_pSprite.spriteName = "stone2"; CSSoundMng.I.Play("Hit" + CSRandom.Rand(1, 4).ToString()); }
E_MONEY_CLASS SelectLevelMoeny() { int nR = -1; for (int i = 0; i < 300; i++) { nR = CSRandom.Rand(0, m_pMoneyInfo.Count); if (JHGameData_Mng.I._GameLevelTime >= m_pMoneyInfo[nR].fStratTime && JHGameData_Mng.I._GameLevelTime < m_pMoneyInfo[nR].fEndTime) { return(m_pMoneyInfo[nR].eClass); } } return(E_MONEY_CLASS.E_PAPER_SILVER); }
override public bool Create() { if (base.Create() == false) { return(false); } m_bLife = true; float fSpawnX = (float)CSRandom.Rand(0, (int)((m_fWallX) * 2.0f)); // fSpawnX += Random.RandomRange(0.0f, 100.0f); fSpawnX -= m_fWallX; m_stPos = new Vector3(fSpawnX, m_fStartY, 0.0f); return(true); }
virtual public bool Create() { if (base.Create() == false) { return(false); } float fSpawnX = (float)CSRandom.Rand(0, (int)((m_fWallX) * 2.0f)); // fSpawnX += Random.RandomRange(0.0f, 100.0f); fSpawnX -= m_fWallX; m_stPos = new Vector3(fSpawnX, m_fStartY, 0.0f); ResetTransform(); return(true); }
// Use this for initialization public void Enter() { m_pList = new List <CSObjectStruct <JHItem_Root> >(); m_nSpawnCnt = 0; m_bActive = true; m_pItemInfoList = new List <ItemInfo>(); int nR = CSRandom.Rand(0, 100); if (nR <= 25) { AddItemCreateTime(E_ITEM_CLASS.E_ITEM_HEART, (float)CSRandom.Rand(5, 150)); } // AddItemCreateTime(E_ITEM_CLASS.E_ITEM_HEART,5); // AddItemCreateTime(E_ITEM_CLASS.E_ITEM_HEART, 5.0f); }
override public bool Create() { if (base.Create() == false) { return(false); } m_bLife = true; float fSpawnX = (float)CSRandom.Rand(0, (int)((m_fWallX - 100.0f) * 2.0f)); fSpawnX += Random.RandomRange(0.0f, 100.0f); fSpawnX -= m_fWallX; if (JHGameData_Mng.I._TutorialState == true) { fSpawnX = JHGame_MainLayer.I._Hero.pSrc._Position.x; } m_stPos = new Vector3(fSpawnX, m_fStartY, 0.0f); return(true); }
override public void HitPlayer() { if (m_bLife == false) { return; } JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_MagicPoof(m_stPos); m_bLife = false; m_eDieDirect = E_CSDIRECT.E_RIGHT; m_fRotationSpeed *= -1.0f; if (JHGame_MainLayer.I._Hero.pSrc._Position.x >= m_stPos.x) { m_eDieDirect = E_CSDIRECT.E_LEFT; m_fDieMoveX *= -1.0f; m_fRotationSpeed *= -1.0f; } CSSoundMng.I.Play("Hit" + CSRandom.Rand(1, 4).ToString()); }
override public void HitPlayer() { if (m_bLife == false) { return; } JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_MagicPoof(JHGame_MainLayer.I._Hero.pSrc._Position); CSSoundMng.I.Stop("TongMove"); m_bLife = false; m_pParticle_Left.gameObject.SetActive(false); m_pParticle_Right.gameObject.SetActive(false); m_pAni.enabled = false; StartCoroutine(Cor_Jump()); m_pSprite.spriteName = "WineDestroy"; // m_pAni.namePrefix = "cowstun_"; // m_pAni.mIndex = 0; // m_pSprite.spriteName = "cowstun_1"; CSSoundMng.I.Play("Hit" + CSRandom.Rand(1, 4).ToString()); CSSoundMng.I.Play("car_crash"); }
override public bool Create() { if (base.Create() == false) { return(false); } m_bLife = true; float fSpawnX = (float)CSRandom.Rand(0, (int)((m_fWallX) * 2.0f)); // fSpawnX += Random.RandomRange(0.0f, 100.0f); fSpawnX -= m_fWallX; m_stPos = new Vector3(fSpawnX, m_fStartY, 0.0f); if (JHGame_MainLayer.I._Hero.pSrc._Position.x <= m_stPos.x) { m_fPlusMove *= -1.0f; } m_stJump.m_fGravity += Random.RandomRange(0.0f, 2.0f); ResetTransform(); return(true); }
override public void HitPlayer() { if (m_bLife == false) { return; } // CSDirector.I.GetDeviceDebug().Log("AAAA"); JHGame_MainLayer.I.m_pEffect_Mng.CreateEffect_PT_MagicPoof(m_stPos); m_bLife = false; m_eDieDirect = E_CSDIRECT.E_RIGHT; m_fRotationSpeed *= -1.0f; if (JHGame_MainLayer.I._Hero.pSrc._Position.x >= m_stPos.x) { m_eDieDirect = E_CSDIRECT.E_LEFT; m_fDieMoveX *= -1.0f; m_fRotationSpeed *= -1.0f; } m_stJump.m_fPower = 22.0f; m_stJump.m_fGravity = 90.9f; StartCoroutine("Cor_Jump"); StartCoroutine("Cor_Banjjack"); CSSoundMng.I.Play("Hit" + CSRandom.Rand(1, 4).ToString()); }
void Btn_ReportScore() { CSSoundMng.I.Play("MenuEF_Button"); JHGooglePS_Mng.I.ReportScore_HighScore(CSRandom.Rand(10, 10000)); }