This file contains 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 auto_reply() { | |
//自動返信メールの件名 | |
var title = "【お問い合わせありがとうございます(自動返信)】"; | |
//自動返信メールの本文1(\nは改行) | |
var body | |
= "この度は和楽器演奏会へお申し込みいただきまして、誠にありがとうございます。\n" | |
+ "お問合せいただいた内容は次の通りです。\n" | |
+ "------------------------------------------------------------\n\n" |
This file contains 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; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class ballScript : MonoBehaviour { | |
public GameObject ballPrefab; | |
public Sprite[] ballSprites; | |
private GameObject firstBall; | |
private GameObject lastBall; |
This file contains 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; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class CameraScript : MonoBehaviour { | |
public GameObject player; | |
public Text scoreText; | |
//********** 開始 **********// | |
public Text highScoreText; //ハイスコアを表示するTextオブジェクト |
This file contains 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; | |
using System.Collections; | |
//MovingObjectを継承 | |
public class Enemy : MovingObject { | |
public int playerDamage; //プレイヤーへのダメージ量 | |
private Animator animator; | |
private Transform target; //プレイヤーの位置情報 | |
private bool skipMove; //敵キャラが動くかどうかの判定 |
This file contains 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; | |
using System.Collections; | |
//MovingObjectクラスを継承する | |
public class Player : MovingObject { | |
public int wallDamage = 1; //壁へのダメージ量 | |
public int pointsPerFood = 10; //フードの回復量 | |
public int pointsPerSoda = 20; //ソーダの回復量 | |
public float restartlevelDelay = 1f; //次レベルへ行く時の時間差 | |
This file contains 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; | |
using System.Collections; | |
public class GameManager : MonoBehaviour { | |
public static GameManager instance = null; | |
public BoardManager boardScript; | |
//********** 開始 **********// | |
public int playerFoodPoints = 100; //プレイヤーの体力 | |
//HideInInspector: public変数だけどInspectorで編集させない |
This file contains 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; | |
using System.Collections; | |
public class Wall : MonoBehaviour | |
{ | |
public Sprite dmgSprite; //攻撃された時に表示する内壁のスプライト画像 | |
public int hp = 3; //内壁の体力 | |
private SpriteRenderer spriteRenderer; | |
This file contains 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
class Animal { | |
private string nakigoe "ウホウホ"; | |
public void AnimalFunction () { | |
print(nakigoe); | |
} | |
} | |
class Hiyoko : Animal { | |
} |
This file contains 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; | |
using System.Collections; | |
public class GenericClassExample : MonoBehaviour { | |
void Start () { | |
//クラスをインスタンス化する際に型引数としてintを指定 | |
GenericClass<int> myClass = new GenericClass<int>(); | |
//引数にint型の5を指定し、UpdateItemメソッドを呼び出す | |
myClass.UpdateItem(5); |
This file contains 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; | |
using System.Collections; | |
//ジェネリック・クラス | |
//取得した型引数を変数の型<T>とする | |
public class GenericClass <T> { | |
T item; | |
public void UpdateItem (T newItem) { | |
item = newItem; | |
Debug.Log(item); |
NewerOlder