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
-- UserInputServiceを取得し、プレイヤーの入力を検出するためのサービスを利用 | |
local UserInputService = game:GetService("UserInputService") | |
-- ReplicatedStorageサービスを取得 | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
-- ReplicatedStorageから「ModuleScriptBullet」という名前のModuleScriptを取得してロード | |
local fireBulletModule = require(ReplicatedStorage:WaitForChild("ModuleScriptBullet")) -- ModuleScript をロード | |
-- プレイヤーの入力が始まった際に呼び出される関数 |
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
-- モジュールの初期化 | |
local module = {} | |
-- RobloxのReplicatedStorageサービスを取得 | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
-- ReplicatedStorageから「Bullet01」という名前の子要素(弾のテンプレート)を待機して取得 | |
local bulletTemplate = ReplicatedStorage:WaitForChild("Bullet01") | |
-- 弾を発射する関数定義。引数playerには、弾を発射するプレイヤーの情報が渡される。 |
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
-- このスクリプトは、特定の空間を表すパーツにアタッチして使用します。 | |
-- パーツに触れたオブジェクト(主にプレイヤーのキャラクターの一部)を検出し、 | |
-- プレイヤーを「死亡」させる機能を持っています。 | |
-- パーツに触れたオブジェクトを検出する関数を定義します。 | |
-- other: パーツに触れたオブジェクト。プレイヤーのキャラクターの一部が該当します。 | |
local function onPartEntered(other) | |
-- 触れたオブジェクトの親要素(キャラクター)を取得します。 | |
local character = other.Parent | |
-- キャラクターからHumanoidオブジェクトを検索します。Humanoidオブジェクトは、 |
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
-- このスクリプトを死亡トリガーとしたいブロックにアタッチしてください。 | |
-- タッチイベントを検出する関数 | |
local function onTouched(other) | |
-- otherはタッチしたオブジェクト。この場合はプレイヤーのキャラクターの一部。 | |
local character = other.Parent -- プレイヤーのキャラクターを取得 | |
local humanoid = character:FindFirstChildOfClass("Humanoid") -- Humanoidオブジェクトを取得 | |
-- Humanoidが存在し、生きている場合にのみ実行 | |
if humanoid and humanoid.Health > 0 then |
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
// | |
//グローバル変数 | |
// | |
//メモ:getRange(row=行,column=列) | |
const spread = SpreadsheetApp.getActiveSpreadsheet(); | |
// | |
//データ | |
// |
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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Serialization; | |
using UnityEngine.UI; | |
public class ScrollView00 : MonoBehaviour | |
{ | |
/// <summary> ボタン親子付け用ルート </summary> |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Missile01Script : MonoBehaviour | |
{ | |
/// <summary> ターゲット(キューブ)</summary> | |
public GameObject mTarget; | |
/// <summary> 向きを変えるスピード</summary> |
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 TMPro; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
namespace Quaternion02 | |
{ | |
/// <summary> | |
/// 任意の回転軸に沿って回転させる |
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 TMPro; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
namespace Quaternion01 | |
{ | |
public class Quaternion01 : MonoBehaviour | |
{ |
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
// | |
//更新履歴 | |
// 2版:2020/4/17:Dictionaryを使用した読み書き追加 | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Bayat.SaveSystem; | |
public class SaveLoadTest : MonoBehaviour |
NewerOlder