-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
38 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,40 @@ | ||
using NaughtyAttributes; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace SS3D.Systems.Animations | ||
{ | ||
public class ItemHitPoint : MonoBehaviour | ||
{ | ||
|
||
public Transform HitPoint; | ||
[SerializeField] | ||
[Dropdown(nameof(GetDirectionValues))] | ||
private Vector3 _forwardHit = Vector3.forward; | ||
|
||
public Vector3 forwardHit = Vector3.forward; | ||
[SerializeField] | ||
[Dropdown(nameof(GetDirectionValues))] | ||
private Vector3 _upHit = Vector3.up; | ||
|
||
public Vector3 upHit = Vector3.up; | ||
[SerializeField] | ||
private Transform _hitPoint; | ||
|
||
public Transform HitPoint => _hitPoint; | ||
|
||
public Vector3 ForwardHit => _forwardHit; | ||
|
||
public Vector3 UpHit => _upHit; | ||
|
||
private DropdownList<Vector3> GetDirectionValues() | ||
{ | ||
return new DropdownList<Vector3>() | ||
{ | ||
{ "Right", Vector3.right }, | ||
{ "Left", Vector3.left }, | ||
{ "Up", Vector3.up }, | ||
{ "Down", Vector3.down }, | ||
{ "Forward", Vector3.forward }, | ||
{ "Back", Vector3.back }, | ||
}; | ||
} | ||
} | ||
} |