void Update() { gameManager.tip = haveTips; gameManager.score = getTip; if (TrickData.c == 1 || TrickData.c == 2) { animator.SetBool("Trick", true); } else { animator.SetBool("Trick", false); } #if UNITY_EDITOR if (Input.GetKeyDown(KeyCode.Space) && isInput) { isInput = false; isAirJump = true; isAirTime = false; airTime = 0; AudioManeger.SoundSE(AudioManeger.SE.SucusseSE); } #else if (Input.touchCount == 2 && isInput) { isInput = false; isAirJump = true; isAirTime = false; airTime = 0; AudioManeger.SoundSE(AudioManeger.SE.SucusseSE); } #endif }
IEnumerator Gauge() { for (int i = 0; i <= 170; i++) { yield return(new WaitForFixedUpdate()); trickGauge.fillAmount -= 0.006f; if (c == 1) { target1.enabled = false; target2.enabled = false; target3.enabled = false; trickGauge.enabled = false; if (i <= 56) { perfect.SetActive(true); Player.Trick(15, 500, 25); CameraManager._isTrick = true; c = 2; AudioManeger.VoiceSE(AudioManeger.Voice.Excellent); } else if (56 < i && i <= 112) { great.SetActive(true); Player.Trick(10, 250, 23.5f); CameraManager._isTrick = true; c = 2; AudioManeger.VoiceSE(AudioManeger.Voice.Good); } else if (112 < i) { good.SetActive(true); Player.Trick(5, 100, 22); CameraManager._isTrick = true; c = 2; AudioManeger.VoiceSE(AudioManeger.Voice.Normal); } } } if (c != 1 && c != 2) { j = 0; i++; CameraManager._isTrick = true; target1.enabled = false; target2.enabled = false; target3.enabled = false; trickGauge.enabled = false; bad.SetActive(true); Player.Trick(0, 0, 13); AudioManeger.VoiceSE(AudioManeger.Voice.Miss); } StartCoroutine(Reset()); }
private void Start() { if (PlayerPrefs.GetInt("chara") == 1) { AudioManeger.SoundBGM(AudioManeger.BGM.Moruga); } else if (PlayerPrefs.GetInt("chara") == 2) { AudioManeger.SoundBGM(AudioManeger.BGM.Asahi); } StartCoroutine(CountDown()); }
public IEnumerator AirMark(float time) { for (int i = 0; i <= 2; i++) { yield return(new WaitForFixedUpdate()); AudioManeger.SoundSE(AudioManeger.SE.TrikcCountdownSE); airFenceMark.SetActive(true); yield return(new WaitForSeconds(time)); airFenceMark.SetActive(false); yield return(new WaitForSeconds(time)); } }
void FixedUpdate() { Jump(); if (isFenceTime) { SpeedReset(changeTimeSpeed, speed); } if (trickcheck) { TrickSpeed(3, m_speed); } if (isAirTime) { airTime += Time.deltaTime; if (airTime > 1.6) { if (airTime <= 1.6 + 0.4) { isInput = true; } else { isAirExit = true; isInput = false; AudioManeger.SoundSE(AudioManeger.SE.ButSE); isAirTime = false; airTime = 0; } } } if (isAirJump == true && isAirTiming == true) { animator.SetBool("isAir", true); PlyPos = transform.position; FirstPos = airOffset - PlyPos; StartCoroutine(AirFenceJump(PlyPos, FirstPos, 0.3f)); isAirTiming = false; } animator.SetBool("isJump", isJumping); }
// Start is called before the first frame update void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); foreach (Sound s in sounds) { s.source = gameObject.AddComponent <AudioSource>(); s.source.clip = s.clip; s.source.volume = s.volume; s.source.pitch = s.pitch; s.source.loop = s.loop; } }
public void CountDown() { AudioManeger.SoundSE(AudioManeger.SE.TrikcCountdownSE); }
// Use this for initialization void Start() { theAM = FindObjectOfType <AudioManeger>(); }
void OnTriggerEnter(Collider other) { if (other.tag == "Goal") { GameManager._isPlay = false; IsArrival = true; } if (other.tag == "ShortFence") { CheckTip("Effect"); ChangeSpeed("ShortFence"); //ショートフェンスに触れたとき AudioManeger.SoundSE(AudioManeger.SE.ShortSE); Instantiate(shortEffect, Vector3.zero, Quaternion.identity, transform); Instantiate(shortEffect2, Vector3.zero, Quaternion.identity, transform); } else if (other.tag == "BoostFence") { CheckTip("Effect"); ChangeSpeed("BoostFence"); //ブーストフェンスに触れたとき animator.SetBool("isBoost", true); Invoke("Boost", 0.5f); AudioManeger.SoundSE(AudioManeger.SE.BoostSE); Instantiate(boostEffect, Vector3.zero, Quaternion.identity, transform); Instantiate(boostEffect1, Vector3.zero, Quaternion.identity, transform); Instantiate(boostEffect2, Vector3.zero, Quaternion.identity, transform); } // Tipを獲得した時の処理。 if (other.tag == "Tip") { haveTips += 1; getTip += levelDesign; //レベルデザイン用変数 CheckTip("GetTip"); AudioManeger.SoundSE(AudioManeger.SE.TipsSE); Destroy(other.gameObject); } //エリアジャンプの処理 if (other.tag == "AreaJump") { animator.SetBool("JumpStart", true); CameraManager.areaJump = true; offset = transform.position; target = other.transform.GetChild(0).transform.position - offset; Furic._trickcheck = true; trick.SetActive(true); trickGauge.SetActive(true); StartCoroutine(AreaJump()); } //エアフェンスの処理 制作山藤 if (other.tag == "AirFence" && isAirJump == true) { isAirJump = false; count = true; StartCoroutine(AirFenceJump(airOffset, airTarget, 0.7f)); } if (other.tag == "AirFencePos") { if (!isCount) { isCount = true; } airTime = 0; if (isInput) { isInput = false; } } //バナナ 制作 山藤 if (other.tag == "Banana") { gameManager.tip = 0; //UIチップの表記の方 haveTips = 0; //スピードの方チップ CheckTip(default);
// Start is called before the first frame update void Start() { main = this; }