added buttons to the inside of the elevator aswell. Started configuring firing mechanism
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,8 @@ Material:
|
||||
m_TexEnvs: []
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors: []
|
||||
m_Colors:
|
||||
- _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &7958070576693489127
|
||||
MonoBehaviour:
|
||||
|
||||
@@ -28,7 +28,7 @@ Material:
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors:
|
||||
- _EmissionColor: {r: 55.79267, g: 9.290461, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 16.233835, g: 2.703219, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &5211763387978159537
|
||||
MonoBehaviour:
|
||||
|
||||
@@ -29,6 +29,7 @@ Material:
|
||||
m_Ints: []
|
||||
m_Floats: []
|
||||
m_Colors:
|
||||
- _Color: {r: 0.9063317, g: 0.9063317, b: 0.9063317, a: 1}
|
||||
- _EmissionColor: {r: 8, g: 8, b: 8, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &5894409217264877673
|
||||
|
||||
@@ -7,7 +7,9 @@ public class ElevatorCaller : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
print(other);
|
||||
SpringyButtonPhysics button = other.GetComponent<SpringyButtonPhysics>();
|
||||
if (button == null) return;
|
||||
else button.Pressed();
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
|
||||
@@ -59,4 +59,8 @@ public class SpringyButtonPhysics : MonoBehaviour {
|
||||
Vector3 worldPos = buttonDirectionRoot.TransformPoint(newLocalPos);
|
||||
rb.MovePosition(worldPos);
|
||||
}
|
||||
public void Pressed()
|
||||
{
|
||||
Debug.Log("Button is pressed");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user