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; | |
public interface ICharacterInput | |
{ | |
/// <summary> | |
/// カメラの現在のForward | |
/// </summary> | |
/// <param name="cameraDirection">Camera direction.</param> | |
void SetCameraDirection(Vector3 cameraDirection); |
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 PlayerMoveUseMove : MonoBehaviour | |
{ | |
private CharacterController characterController; | |
public float speed = 3.0f; | |
void Start() | |
{ |
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 UniRx; | |
using System.Linq; | |
public class Command : MonoBehaviour | |
{ | |
enum InputStatus | |
{ |
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
private CharacterController characterController; | |
bool IsJumpable | |
{ | |
get | |
{ | |
if (!characterController.isGrounded) | |
{ | |
return false; | |
} |
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
Observable.Start(() => | |
{ | |
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("http://google.com"); | |
return (HttpWebResponse)webRequest.GetResponse(); | |
}) | |
.CatchIgnore((WebException e) => | |
{ | |
//WebException発生時の処理 | |
Debug.LogError(e.Status); | |
}) |
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 UniRx; | |
using UnityEngine.UI; | |
namespace UniRxSamples | |
{ | |
public class ButtonClick : MonoBehaviour | |
{ | |
[SerializeField] private Button button; | |
[SerializeField] private Text 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 UniRx; | |
using UnityEngine.UI; | |
namespace UniRxSamples | |
{ | |
public class InputFieldToText : MonoBehaviour | |
{ | |
[SerializeField] | |
private InputField inputField; |
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.Generic; | |
using UnityEngine; | |
using UniRx; | |
using UnityEngine.UI; | |
using System.Linq; | |
using System.Xml.Linq; | |
namespace UniRxSamples | |
{ | |
public class SuggestText : 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
using UnityEngine; | |
using UniRx; | |
namespace UniRxSamples | |
{ | |
public class OnGroundedScript : ObservableMonoBehaviour | |
{ | |
public override void Start() | |
{ | |
var characterController = GetComponent<CharacterController>(); |
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
var enemyNames = Enemys.GetComponentsInChildren<Enemy>() | |
.Where(x => x.HP > 0) | |
.Where(x => | |
{ | |
var enemyPos = x.transform.position; | |
var playerPos = player.transform.position; | |
return Vector3.Distance(enemyPos, playerPos) <= 10; | |
}) | |
.Where(x => | |
{ |
OlderNewer