Skip to content

Instantly share code, notes, and snippets.

@Taka414
Taka414 / JumpBy.cs
Last active Jun 20, 2020
[Unity] Port 'Jumpby' from Cocos2d-x
View JumpBy.cs
//
// (c) 2020 Tapap.
// Licensed under MIT.
//
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Takap.Utility
View JsonUtility.cs
public static class JsonUtility
{
/// <summary>
/// 任意のオブジェクトを JSON メッセージへシリアライズします。
/// </summary>
public static string Serialize(object graph)
{
using (var stream = new MemoryStream())
{
var serializer = new DataContractJsonSerializer(graph.GetType());
@Taka414
Taka414 / BarState.h
Last active Feb 15, 2017
Cocos2d-x over 3.1x HPBar Implementation
View BarState.h
#pragma once
#pragma execution_character_set("utf-8")
namespace HpBar
{
// バーの状態を表します。
enum class BarState : int
{
Unknwon = 0, //未設定
Green, Yellow, Red,