//------------------------------------------------------------------------- public void create(CRenderScene scene, CRenderTurret render_turret) { mScene = scene; mCRenderTurret = render_turret; int turret_id = render_turret.getTurretId(); CTurretHelper turret_helper = mScene.getTurretHelper(); float base_angle = turret_helper.getBaseAngleByTurretId(turret_id); mCSpriteCounter = new CSpriteCounter(mScene, turret_helper.getPositionByOffset(turret_id, mScene.getRenderConfigure().ChipsOffset), turret_helper.getBaseAngleByTurretId(turret_id)); mScoreTurnplate = new CSpriteScoreTurnplate(mScene, turret_helper.getPositionByOffset(turret_id, mScene.getRenderConfigure().TurretTurnplateOffset), base_angle); //mCSpriteScore = new CSpriteScore(mScene, turret_helper.getPositionByOffset(turret_id, mScene.getRenderConfigure().ChipsOffset), 0, turret_id); if (turret_id == 0 || turret_id == 1) { EbVector3 offset = mScene.getRenderConfigure().TurretPanelScoreOffset; offset.x += mScene.getRenderConfigure().UpTurretPanelScoreOffset; //mCSpriteScore.setDigitPosition(turret_helper.getPositionByOffset(turret_id, offset), 0); } else { //mCSpriteScore.setDigitPosition(turret_helper.getPositionByOffset(turret_id, mScene.getRenderConfigure().TurretPanelScoreOffset), base_angle); } //mCSpriteScore.setBgPosition(turret_helper.getPositionByOffset(turret_id, mScene.getRenderConfigure().TurretPanelScoreBgOffset), base_angle); }
//------------------------------------------------------------------------- public void destroy() { //if (mCSpriteScore != null) //{ // mCSpriteScore.release(); // mCSpriteScore = null; //} if (mScoreTurnplate != null) { mScoreTurnplate.release(); mScoreTurnplate = null; } if (mCSpriteCounter != null) { mCSpriteCounter.destroy(); mCSpriteCounter = null; } mAimParticle = null; }