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; | |
using UnityEngine.UI; | |
public class TestInput : MonoBehaviour | |
{ | |
private Image image; | |
private Vector2 initPosition; | |
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
require 'rails_helper' | |
RSpec.describe "UserController", type: :request do | |
describe "#index" do | |
let(:user) { FactoryGirl.create(:user) } | |
context 'success' do | |
before do | |
allow_instance_of(ApplicationController).to receive(:current_user).and_return(user) |
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
require 'rails_helper' | |
RSpec.describe "UserController", type: :request do | |
describe "#index" do | |
let(:user) { FactoryGirl.create(:user) } | |
context 'success' do | |
before do | |
get user_path user |
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 Target : MonoBehaviour { | |
private float RotateSpeed = 100f; | |
private float Radian = 0f; | |
private float HeadPoint = 1.2f; |
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
[Serializable] | |
public class EnemyManager { | |
private Player player; | |
[SerializeField]private List<Enemy> enemies = new List<Enemy> (); | |
public EnemyManager (Player p) { | |
player = p; | |
} |
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; | |
using UnityEngine.UI; | |
public class Notice : MonoBehaviour { | |
public Sprite warning; // default | |
public Sprite discovery; |
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 Enemy : MonoBehaviour { | |
private readonly float LookedDistance = 2f; | |
private Player player; | |
private CharacterControl cc; |
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 Player : MonoBehaviour { | |
[HideInInspector]public float HeighToRoof = 0f; | |
private CharacterControl CharactorCTL; | |
private CameraControl CameraCTL; |
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 CharacterControl : MonoBehaviour { | |
public bool isGround = false; | |
[HideInInspector]public Rigidbody rb; | |
private float height = 0f; |
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; | |
// Attach to Main Camera of CametaCenter Empty GameObject child. | |
public class CameraControl : MonoBehaviour { | |
private readonly float MAX_TURN_UP = 5f; | |
private readonly float MAX_TURN_DOWN = 0f; | |
private float InitPositionY = 0f; |
NewerOlder