Skip to content

Instantly share code, notes, and snippets.

@Seasons7
Seasons7 / SwiftSpriteSample01.swift
Last active August 29, 2015 14:12
SwiftSpriteSample01
import Foundation
class MainScene: CCNode {
override func onEnter() {
var sp = CCSprite(imageNamed: "iPhone.png")
self.addChild(sp)
sp.position = ccp(200,200)
@Seasons7
Seasons7 / ccswift20141228.swift
Created December 27, 2014 16:48
ccswift20141228
import Foundation
class MainScene: CCNode {
override func onEnter() {
var winSize = CCDirector.sharedDirector().designSize
var chara = CCSprite(imageNamed: "images/image.png")
self.addChild(chara)
@Seasons7
Seasons7 / ccswift20141231.swift
Created December 30, 2014 17:51
ccswift20141231_01
var chara = CCSprite(imageNamed: "images/image.png")
@Seasons7
Seasons7 / CCSwift20141231_02.m
Created December 30, 2014 17:57
CCSwift20141231_02
NSString * const CCFileUtilsSuffixDefault = @"default";
NSString * const CCFileUtilsSuffixiPad = @"ipad";
NSString * const CCFileUtilsSuffixiPadHD = @"ipadhd";
NSString * const CCFileUtilsSuffixiPhone = @"iphone";
NSString * const CCFileUtilsSuffixiPhoneHD = @"iphonehd";
NSString * const CCFileUtilsSuffixiPhone5 = @"iphone5";
NSString * const CCFileUtilsSuffixiPhone5HD = @"iphone5hd";
NSString * const CCFileUtilsSuffixMac = @"mac";
NSString * const CCFileUtilsSuffixMacHD = @"machd";
@Seasons7
Seasons7 / ccswift20150101.swift
Created December 30, 2014 21:25
ccswift20150101
import Foundation
class MainScene: CCNode {
override func onEnter() {
self.userInteractionEnabled = true
super.onEnter()
}
@Seasons7
Seasons7 / ccswift20150102.swift
Created January 2, 2015 14:37
ccswift20150102
import Foundation
class MainScene: CCNode {
let audio:OALSimpleAudio = OALSimpleAudio.sharedInstance()
override func onEnter() {
self.userInteractionEnabled = true
@Seasons7
Seasons7 / ccswift20150324.swift
Created March 23, 2015 17:04
ccswift20150324
import Foundation
class MainScene: CCNode {
let audio:OALSimpleAudio = OALSimpleAudio.sharedInstance()
override func onEnter() {
audio.playBg("bgm.mp3", loop: true)
}
}
@Seasons7
Seasons7 / sc_find.py
Created July 11, 2015 06:44
Keychain codesign information
import commands
import re
def get_codesign_entries_from_keychain():
cm = 'security find-identity -v -p codesigning'
result = commands.getoutput(cm)
entries = []
if result:
items = result.split('\n')
/*
* simple SQLite3 wrapper for Objective-C.
*
* @author mootoh
*/
#import <sqlite3.h>
@implementation LocalCache
# --------------------------------------------------------------------------
# 拡張子の異なる同じファイル名の内容を検査
# "*"はコメント扱い
#
# 例) HogeHoge.csv HogeHoge.csv2
#
# --------------------------------------------------------------------------
$KCODE = "S"
require 'pp'