-
-
Save TSUMIKISEISAKU/7aa9c2923a9c40851bd3112c300160db to your computer and use it in GitHub Desktop.
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; | |
/// <summary> | |
/// マーキングの入力の取得 デモ用 | |
/// </summary> | |
public class MarkingInputHandler_Demo : MonoBehaviour | |
{ | |
[SerializeField, Tooltip("マーキング制御")] | |
private MarkingHandler _markingHandler; | |
[SerializeField, Tooltip("マーキング位置のガイド")] | |
private Transform _markingPosition; | |
[SerializeField, Tooltip("スプレーのエフェクトの制御")] | |
private SprayEffectHandler _sprayEffectHandler; | |
[SerializeField, Tooltip("コントローラーの入力取得")] | |
private ControllerInputHandler _controllerInputHandler; | |
// Start is called before the first frame update | |
void Start() | |
{ | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
if (_controllerInputHandler.LeftTriggerDown()) | |
{ | |
_sprayEffectHandler.Play(); | |
} | |
if (_controllerInputHandler.LeftTriggerHold()) | |
{ | |
_markingHandler.PaintTest(_markingPosition.position, _markingPosition.forward); | |
} | |
if (_controllerInputHandler.LeftTriggerUp()) | |
{ | |
_sprayEffectHandler.Stop(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment