Skip to content

Instantly share code, notes, and snippets.

View tsuzukihashi's full-sized avatar
🎮

Ryo Tsuzukihashi tsuzukihashi

🎮
View GitHub Profile
package chap06;
import java.util.Random;
import java.util.Scanner;
class Ex614 {
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
Random rand = new Random();
String[] monthString = {"January","Feburary","March","April","May","June",
"July","August","September","October","November","December"
};
using System;
namespace Example
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("C# gives you programing power.");
}
IEnumerator Timer()
{
while (true)
{
DateTime dtNow = DateTime.Now;
DayOfWeek week = dtNow.DayOfWeek;
int weekNumber = (int)dtNow.DayOfWeek;
now_year = dtNow.Year;
now_month = dtNow.Month;
@tsuzukihashi
tsuzukihashi / Idiom
Created April 28, 2018 13:09
Sample_CSV
band,バンド
bar,棒
bear,クマ
beef,牛肉
beer,ビール
bell,ベル
butter,バター
candle,ろうそく
candy,キャンディー
carpet,じゅうたん
@tsuzukihashi
tsuzukihashi / stopwatch.html
Created May 1, 2018 04:50
ストップウォッチ
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>ストップウォッチ</title>
<script>
window.onload = function () {
@tsuzukihashi
tsuzukihashi / bmi.html
Created May 1, 2018 05:50
BMI値計算
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>BMI値計算</title>
<script>
window.onload = function(){
document.getElementById("button").onclick = function(){
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>円上のn分点を結ぶ</title>
<script>
function diamond(c,n,x,y,r,color){
c.strokeStyle = color;
//ボタンをタップした処理だけを実行するための関数
private bool IsPointerOverUIObject()
{
PointerEventData eventDataCurrentPosition = new PointerEventData(EventSystem.current);
eventDataCurrentPosition.position = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
List<RaycastResult> results = new List<RaycastResult>();
EventSystem.current.RaycastAll(eventDataCurrentPosition, results);
@tsuzukihashi
tsuzukihashi / file0.txt
Last active March 25, 2020 05:06
Unity uGUIをドラッグで動かしてステージを選ぶ ref: https://qiita.com/tsuzuki817/items/659a20ff57c83a022560
using UnityEngine;
using UnityEngine.EventSystems;
public class SlideController : MonoBehaviour, IDragHandler {
public RectTransform m_rectTransform = null;
public void OnDrag(PointerEventData eventData)
{
m_rectTransform.position += new Vector3(eventData.delta.x*0.01f, 0f, 0f);
@tsuzukihashi
tsuzukihashi / DDManager.cs
Last active August 31, 2019 06:57
Unity 全シーン管理マネージャーの作成 ref: https://qiita.com/tsuzukihashi/items/1d8a9fce4465c688c78a
using UnityEngine;
public class DDManager : MonoBehaviour {
public GameObject gameObject;
void Start () {
DontDestroyOnLoad(gameObject);
}