Skip to content

Instantly share code, notes, and snippets.

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>();
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>();
@tak-km
tak-km / targets.cs
Last active January 23, 2017 14:29
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;
@tak-km
tak-km / gas_FormToCalender.gs
Last active December 5, 2016 09:10
googleフォームからカレンダーへ登録するスクリプト
function sendMailGoogleForm() {
// 件名、本文、フッター
var subject = "[イベント登録ありがとうございます。]";
var body
= "イベント登録ありがとうございます。\n\n"
+ "------------------------------------------------------------\n";
var footer
= "------------------------------------------------------------\n\n"
+ "";
@tak-km
tak-km / 0_reuse_code.js
Created December 18, 2015 01:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tak-km
tak-km / TileBase.cs
Last active December 7, 2015 02:30
選択された時色を変えるタイル
using UnityEngine.EventSystems;// EventSystem利用
public class TileBase : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler,IPointerDownHandler {
private Color default_color; // 初期化カラー
private Color select_color; // 選択時カラー
protected Material _material;
void Start () {
// このクラスが付属しているマテリアルを取得