shield spell, ice bolt adjustments, training dummys
This commit is contained in:
@@ -11,7 +11,7 @@ GameObject:
|
||||
- component: {fileID: 4402262400481754071}
|
||||
- component: {fileID: 772404450966566002}
|
||||
- component: {fileID: 3268723311598239928}
|
||||
- component: {fileID: 5154885136569341264}
|
||||
- component: {fileID: 7564575873016353892}
|
||||
m_Layer: 0
|
||||
m_Name: shield_spell
|
||||
m_TagString: Untagged
|
||||
@@ -84,8 +84,8 @@ MeshRenderer:
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!64 &5154885136569341264
|
||||
MeshCollider:
|
||||
--- !u!65 &7564575873016353892
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
@@ -94,7 +94,6 @@ MeshCollider:
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -462981019419857548, guid: 61bc520e906d62948ad0190bdafa7e0b, type: 3}
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 3.8, y: 0.3, z: 2.0000007}
|
||||
m_Center: {x: 0, y: -0.0046907673, z: 0.000000001118366}
|
||||
|
||||
@@ -43,17 +43,21 @@ public class ActionGestureInteraction : MonoBehaviour
|
||||
{
|
||||
Debug.LogWarning("WOODCUTTING ACTION");
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case "VerticalLine":
|
||||
if (holdingWand)
|
||||
{
|
||||
Debug.LogWarning("WAND VERTICAL");
|
||||
Vector3 spawnPoint = transform.position + playerCamera.transform.forward;
|
||||
spawnPoint = new Vector3(spawnPoint.x, spawnPoint.y + 1, spawnPoint.z);
|
||||
Instantiate(objects[1], spawnPoint, Quaternion.Euler(-90,playerCamera.transform.eulerAngles.y-180,180));
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("VERTICAL");
|
||||
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case "Circle":
|
||||
if (holdingWand)
|
||||
{
|
||||
@@ -64,7 +68,7 @@ public class ActionGestureInteraction : MonoBehaviour
|
||||
{
|
||||
Debug.LogWarning("CIRCLE");
|
||||
}
|
||||
return;
|
||||
break;
|
||||
case "Triangle":
|
||||
if (holdingWand)
|
||||
{
|
||||
@@ -74,7 +78,7 @@ public class ActionGestureInteraction : MonoBehaviour
|
||||
{
|
||||
Debug.LogWarning("WOODCUTTING ACTION");
|
||||
}
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
/*if (action == "Portal")
|
||||
@@ -163,6 +167,6 @@ public class ActionGestureInteraction : MonoBehaviour
|
||||
{
|
||||
Debug.LogWarning("INSTANTIATE BOLT");
|
||||
var projectileObj = Instantiate(item, rightHandTransform.position, playerCamera.transform.rotation) as GameObject;
|
||||
projectileObj.GetComponent<Rigidbody>().velocity = (destination - rightHandTransform.position).normalized * projectileSpeed;
|
||||
projectileObj.GetComponent<Rigidbody>().velocity = (playerCamera.transform.forward).normalized * projectileSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,29 +12,39 @@ public class Projectile : MonoBehaviour
|
||||
// Will always be destroyed after 10 seconds.
|
||||
Destroy(gameObject, 10);
|
||||
|
||||
oldEulerAngles = transform.rotation.eulerAngles;
|
||||
//oldEulerAngles = transform.rotation.eulerAngles;
|
||||
}
|
||||
private void Update()
|
||||
{
|
||||
if (oldEulerAngles != transform.rotation.eulerAngles)
|
||||
/*if (oldEulerAngles != transform.rotation.eulerAngles)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
private void onCollisionEnter(Collider other)
|
||||
private void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
Debug.LogWarning(collision.gameObject.name);
|
||||
if (collision.gameObject.tag != "IceBolt" && collision.gameObject.tag != "Player" && !collided)
|
||||
{
|
||||
collided = true;
|
||||
if (collision.gameObject.name == "Dummy") Destroy(collision.gameObject); //REPLACE WITH ENEMY TAG CHECK
|
||||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
}
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
Debug.LogWarning(other.gameObject.name);
|
||||
if (other.gameObject.tag != "IceBolt" && other.gameObject.tag != "Player" && !collided)
|
||||
{
|
||||
collided = true;
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
private void onTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.gameObject.tag != "IceBolt" && other.gameObject.tag != "Player" && !collided)
|
||||
else if (other.gameObject.name == "Dummy")
|
||||
{
|
||||
collided = true;
|
||||
Destroy(other.gameObject);
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user