Ubuntu安裝teamviewer註意事項。
Ubuntu安裝teamviewer註意事項。
首先通過瀏覽器到官方下載ubuntu對應teamviewer的安裝包
但是通過dpkg –i安裝之後發現安裝過程出問題,安裝好的包打開之後也閃退。
這個時候需要
使用如下命令處理依賴問題
sudo apt-get install –f
運行完了之後再dpkg -i安裝一遍,就會發現沒有出錯了。
這個時候點teamviewer的圖標打開還是不顯示。
通過命令行輸入teamviewer來啟動teamviewer,這個時候,圖形界面就出來了!!!!
class DigitalBeatText:public cocos2d::Node
{
public:
DigitalBeatText();
~DigitalBeatText();
static DigitalBeatText *create(int value);
void setValue(int newValue);
protected:
bool init(int value);
void setValueNoAction(int newValue);
void startRoll();
void stopRoll();
void onTimeHandler(www.michenggw.com float dt);
protected:
cocos2d::ui::Text * m_txt;
int m_lastValue;
int m_newValue;
int m_valueGap; //數字跳動間隔
float m_scheduleInterval;//調度器間隔
bool m_isReverse; // true: 從大到小
};
DigitalBeatText::DigitalBeatText()
:m_txt(nullptr)
, m_lastValue(0)
, m_newValue(0)
, m_valueGap(0)
, m_scheduleInterval(1.0f/60.f)
, m_isReverse(false)
{
}
DigitalBeatText::www.dasheng178.com~DigitalBeatText()
{
}
DigitalBeatText* DigitalBeatText::create(int value)
{
auto pRet = new DigitalBeatText;
if (pRet->init(value))
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return nullptr;
}
bool DigitalBeatText::init(int value)
{
if (!Node::init(yongshiyule178.com)){
return false;
}
char buff[16] www.mhylpt.com/= { 0 };
m_txt = ui::Text::create();
m_txt->setFontSize(36);
sprintf(buff, "%d", value);
m_txt-www.mcyllpt.com>setString(buff);
this->addChild(m_txt);
return true;
}
void DigitalBeatText::setValue(int newValue)
{
m_isReverse = newValue < m_lastValue;
stopRoll();
m_newValue = newValue;
startRoll();
}
void DigitalBeatText::setValueNoAction(int newValue)
{
m_lastValue = newValue;
m_newValue = newValue;
m_txt-www.tongqt178.com>setString(cocos2d::StringUtils::toString(m_lastValue));
}
void DigitalBeatText::startRoll()
{
int count = m_newValue - m_lastValue;
if (count>0){
m_valueGap = ceil(count www.meiwanyule.cn// (1.0 / m_scheduleInterval));
}else{
m_valueGap = floor(count / (1.0 / m_scheduleInterval));
}
schedule(CC_SCHEDULE_SELECTOR(DigitalBeatText::onTimeHandler), m_scheduleInterval);
}
void DigitalBeatText::stopRoll()
{
unschedule(CC_SCHEDULE_SELECTOR(DigitalBeatText::onTimeHandler));
}
void DigitalBeatText::onTimeHandler(float dt)
{
m_lastValue += m_valueGap;
bool stop = false;
if (!m_isReverse)
{
if (m_lastValue >= m_newValue){
m_lastValue = m_newValue;
stop = true;
}
}
else{
if (m_lastValue <= m_newValue){
m_lastValue = m_newValue;
stop = true;
}
}
m_txt->setString(cocos2d::StringUtils::toString(m_lastValue));
if (stop){
this->stopRoll();
}
}
m_index = 1;
m_beatT = DigitalBeatText::create(m_index);
m_beatT->setPosition(visibleSize*0.5);
this->addChild(m_beatT);
m_index += RandomHelper::random_int(0, 100) - 50;
m_beatT->setValue(m_index);
Ubuntu安裝teamviewer註意事項。