Created
July 19, 2019 10:32
-
-
Save lycoris102/511d45052a5db866d9a0d3221df67c56 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Cinemachine; | |
using UnityEngine; | |
public class PlayerEffect : MonoBehaviour | |
{ | |
[SerializeField] private CinemachineImpulseSource cinemachineImpulseSource; | |
public CinemachineImpulseSource CinemachineImpulseSource => cinemachineImpulseSource; | |
void OnDamage() | |
{ | |
this.CinemachineImpulseSource.GenerateImpulse(); | |
// 発生源および衝撃の方向・強さを指定できる GenerateImpulseAt もある | |
//this.CinemachineImpulseSource.GenerateImpulseAt(position, velocity); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment