添加辽宁鞍山脚本,修改Gun2、Gun3脚本
This commit is contained in:
@@ -87,11 +87,15 @@ public class Gun2 : Launcher
|
||||
bool isGrip = false;
|
||||
rightHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out isTrigger);
|
||||
rightHandDevice.TryGetFeatureValue(CommonUsages.gripButton, out isGrip);
|
||||
// if (Input.GetMouseButton(0))
|
||||
// {
|
||||
// isTrigger = true;
|
||||
// }
|
||||
if(isTrigger||isGrip)
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
isTrigger = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isTrigger||isGrip)
|
||||
{
|
||||
CmdShot();
|
||||
}
|
||||
|
||||
@@ -70,11 +70,15 @@ public class Gun3 : Launcher
|
||||
bool isGrip = false;
|
||||
rightHandDevice.TryGetFeatureValue(CommonUsages.triggerButton, out isTrigger);
|
||||
rightHandDevice.TryGetFeatureValue(CommonUsages.gripButton, out isGrip);
|
||||
// if (Input.GetMouseButton(0))
|
||||
// {
|
||||
// isTrigger = true;
|
||||
// }
|
||||
if(isTrigger||isGrip)
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (Input.GetMouseButton(0))
|
||||
{
|
||||
isTrigger = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isTrigger||isGrip)
|
||||
{
|
||||
CmdShot();
|
||||
}
|
||||
|
||||
@@ -119,17 +119,17 @@ public class Player : NetworkRoomPlayer,IDamagable
|
||||
{
|
||||
float curDamage = damage;
|
||||
SetBlood(-curDamage);
|
||||
|
||||
//#if !UNITY_EDITOR && UNITY_ANDROID && PICO
|
||||
// if (_sender != null)
|
||||
// {
|
||||
// Vector3 forward = transform.forward;
|
||||
// Vector3 directionFormHit=(transform.position-_sender.position).normalized;
|
||||
// float angle = Vector3.Angle(forward, directionFormHit);
|
||||
// int index = Random.Range(0, 4);
|
||||
// TrueGearEffectManager.Ins.OnHit(angle > 90,index,false);
|
||||
// }
|
||||
//#endif
|
||||
|
||||
#if !UNITY_EDITOR && UNITY_ANDROID && PICO
|
||||
if (_sender != null)
|
||||
{
|
||||
Vector3 forward = transform.forward;
|
||||
Vector3 directionFormHit=(transform.position-_sender.position).normalized;
|
||||
float angle = Vector3.Angle(forward, directionFormHit);
|
||||
int index = Random.Range(0, 4);
|
||||
TrueGearEffectManager.Ins.OnHit(angle > 90,index,false);
|
||||
}
|
||||
#endif
|
||||
if (currentHp <= 0 && IsAlive)
|
||||
{
|
||||
IsAlive = false;
|
||||
|
||||
Reference in New Issue
Block a user