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
/// <summary> | |
/// 表示区画の枠 | |
/// </summary> | |
[MenuItem("Tool/RefreshLineFrame")] | |
static void RefreshLineFrame() | |
{ | |
// 枠 | |
lineFrame = GameObject.Find("LineFrame"); | |
transform_lineFrame = lineFrame.GetComponent<Transform>(); | |
LineRenderer lineRenderer = lineFrame.GetComponent<LineRenderer>(); |
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
Project | |
| | |
+-- ゲームオブジェクト | |
~~~~~~~~~~~~~~~~ | |
| | |
+-- スプライト・レンダラー | |
| | |
+-- アニメーター |
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
![undefined]() |
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
void FixedUpdate() | |
{ | |
#region 歩行 | |
if (isGrounded)// 接地していれば | |
{ | |
if (!this.IsJump1Motion)//ジャンプ時の屈伸中ではないなら | |
{ | |
//左キー: -1、右キー: 1 | |
float leverX = Input.GetAxisRaw(CommonScript.PlayerAndButton_To_ButtonName[playerIndex, (int)ButtonIndex.Horizontal]); |
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; | |
[System.Serializable] | |
public class PlayerInfo | |
{ | |
public string name; | |
public int lives; | |
public float health; | |
public static PlayerInfo CreateFromJSON(string jsonString) |
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
※前略 | |
"tileheight":32, | |
"tilesets":[ | |
{ | |
"columns":32, | |
"firstgid":1, | |
"image":"..\/RunAndJump\/Assets\/Resources\/Sprites\/Textures\/Stage_32x32.png", | |
"imageheight":1024, | |
"imagewidth":1024, | |
"margin":0, |
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
@startuml | |
きふわらべ -> お父ん : 起きろ☆! | |
きふわらべ <- お父ん : 起きてるぜ☆! | |
@enduml |
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
// Tile1 ゲーム・オブジェクトを作る | |
GameObject go = new GameObject("Tile1", typeof(SpriteRenderer)); | |
// 在るものから探す場合 | |
// GameObject go = GameObject.Find("Tile1"); | |
SpriteRenderer rend = go.GetComponent<SpriteRenderer>(); | |
rend.sortingLayerName = "Ground"; |
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
// ヒットボックスのスプライト | |
void Update() | |
{ | |
// ~略~ | |
hitboxTransform.Translate( | |
offsetX - hitboxTransform.position.x, | |
offsetY - hitboxTransform.position.y, | |
hitboxTransform.position.z | |
); |
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
// 多分こんな感じで 上に行く | |
transform.Translate( 0, 200f, 0 ); |