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 CameraMovement_Mouse : MonoBehaviour { | |
public Transform target; //<! Playerを中心に回転するのに使用 | |
public float speedY = 60f; | |
public float maxAngle = 45f; | |
private float anglePerSec = 360f; //<! 角速度(オイラー) | |
private float hitDir = 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 UnityEngine; | |
using System.Collections; | |
public class CameraFollowing : MonoBehaviour { | |
public Transform target; | |
public float distance = 1f; | |
private Vector3 tarPosXZ;//<! ワールド空間 | |
private Vector3 camPosXZ;//<! ワールド空間 | |
private Vector3 direction;//<! ワールド空間 |
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 PlayerMovement : MonoBehaviour { | |
[SerializeField] | |
private float speed =3.5f; | |
private Rigidbody playerRig; | |
private Vector3 movement;//<! 移動先の座標(Updateで更新する) |
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 CharacterChanger : MonoBehaviour { | |
public Avatar [] avatars = new Avatar[3]; | |
public GameObject [] characters = new GameObject[3]; | |
private int index = 0; | |
private Animator playerAnimator; |
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 EnemyMovement : MonoBehaviour { | |
public float slowSpeed; | |
public Transform player; | |
private NavMeshAgent nav; | |
private Animator animator; | |
private int currentPath=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
using UnityEngine; | |
using System.Collections; | |
public class BulletBehaviour : MonoBehaviour { | |
public float speed = 20f; | |
public float time_Destroy = 2f; | |
private Rigidbody bulRig; | |
private string shooterTag; | |
private LifeManager lifeManager; |
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 EnemyAttack : MonoBehaviour { | |
public float range_punch = 1f; | |
public float range_shooting = 10f; | |
public float interval = 3f; | |
public AudioSource soundPunch; | |
public AudioSource soundShoot; |
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 PunchBehaviour : MonoBehaviour { | |
public float time_Destroy = 0.5f; | |
public LifeManager lifeManager;//このオブジェクトはHierarchyに常に存在するので直接参照可能 | |
public GameObject attacker; | |
private string attackerTag; |
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 CoinBehaviour : MonoBehaviour { | |
public ParticleSystem parSys; | |
public int score = 10;//<! コインによる獲得スコア | |
private SpawnManager spawn; //<! SpawnManagerで設定 | |
private string [] objectNames = {"SunnySD","LunaSD","StarSD"};//<! Hierarchy上のオブジェクト名を変更の際は注意 | |
private int gettableIndex = 0;//<! コインを入手できるキャラクターのindex。objectNamesに対応。 |
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 ItemBehaviour : MonoBehaviour { | |
private SpawnManager spawn; //<! SpawnManagerで設定 | |
protected GameObject manager; | |
// 派生先で処理を拡張する | |
protected virtual void Start () { |
OlderNewer