This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// header file | |
#include "cocos-ext.h" | |
#include "CCPointer.h" | |
// https://github.com/ivzave/cocos2dx-ext/blob/master/CCPointer.h | |
USING_NS_CC; | |
USING_NS_CC_EXT; | |
class CCLabelTTFWithAnimation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class Version(v: Int *) extends Ordered[Version] { | |
def compare(other: Version) = { | |
c(v,other.v) | |
} | |
def c(v1: Seq[Int], v2: Seq[Int]): Int = { | |
val diff = v1.headOption.getOrElse(0) compare v2.headOption.getOrElse(0) | |
if(diff == 0) c(v1.tail,v2.tail) else diff | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool HelloWorld::init() | |
{ | |
if (!Layer::init()) return false; | |
auto reader = cocostudio::SceneReader::getInstance(); | |
// SceneEditorデフォルトに存在するサンプルを読み込む | |
auto node = reader->createNodeWithSceneFile("FightScene.json"); | |
auto hero = node->getChildByTag(10005); // サンプル上のheroに設定されていたtagの値 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "org.json4s" %% "json4s-native" % "3.2.4" | |
import org.json4s._ | |
import org.json4s.native.Serialization._ | |
case class AAA(a : Option[Long],b : Option[Long],c : Option[Long]) | |
object JsonTest { | |
def toJson[Value <: AnyRef](any : Value) : String = { | |
write(any)(DefaultFormats) |
NewerOlder