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
using UnityEngine.EventSystems;// EventSystem利用 | |
public class TileBase : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler,IPointerDownHandler { | |
private Color default_color; // 初期化カラー | |
private Color select_color; // 選択時カラー | |
protected Material _material; | |
void Start () { | |
// このクラスが付属しているマテリアルを取得 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
function sendMailGoogleForm() { | |
// 件名、本文、フッター | |
var subject = "[イベント登録ありがとうございます。]"; | |
var body | |
= "イベント登録ありがとうございます。\n\n" | |
+ "------------------------------------------------------------\n"; | |
var footer | |
= "------------------------------------------------------------\n\n" | |
+ ""; |
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
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); | |
RaycastHit hit; | |
float rayRange = 100f; | |
void Update () { | |
if (Input.GetMouseButtonDown(0)) { | |
if(Physics.Raycast(ray,out hit)) { | |
Vector3 targetPos = hit.point; | |
Debug.Log(targetPos); | |
Targets [count].transform.position = targetPos; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class OccupyController : MonoBehaviour { | |
[SerializeField] | |
List<GameObject> soldierList1 = new List<GameObject>(); | |
[SerializeField] | |
List<GameObject> soldierList2 = new List<GameObject>(); |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class OccupyController2 : MonoBehaviour { | |
[SerializeField] | |
List<GameObject> soldierList1 = new List<GameObject>(); | |
[SerializeField] | |
List<GameObject> soldierList2 = new List<GameObject>(); |
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
import binascii | |
import nfc | |
import pandas as pd | |
import urllib | |
import urllib2 | |
class MyCardReader(object): | |
def on_connect(self, tag): | |
print "touched" |
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
from __future__ import print_function | |
from future.standard_library import install_aliases | |
install_aliases() | |
from urllib.parse import urlparse, urlencode | |
from urllib.request import urlopen, Request | |
from urllib.error import HTTPError | |
import json | |
import os |
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
require 'discordrb' | |
require "csv" | |
#client_idはbotに設定されているものを入力 prefixはコマンドの呼び出しの時の記号(!play 等の!部分 ?とかでも可) | |
bot = Discordrb::Commands::CommandBot.new token: '自分のトークン', client_id: 000000000000, prefix: '!' | |
#スプラトゥーンの武器名が入っているcsvファイルを読み込み | |
data = CSV.read('buki.csv') | |
bot.command :random_buki do |event| | |
server = bot.servers.first[1] |
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
#include <dlib/opencv.h> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <dlib/image_processing/frontal_face_detector.h> | |
#include <dlib/image_processing/render_face_detections.h> | |
#include <dlib/image_processing.h> | |
#include <dlib/gui_widgets.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> |
OlderNewer