Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabo1208 committed Nov 29, 2017
1 parent cfaba5b commit 9734f6b
Show file tree
Hide file tree
Showing 18 changed files with 155 additions and 26 deletions.
Binary file modified .vs/IA Videojuegos/v15/.suo
Binary file not shown.
Binary file modified .vs/IA Videojuegos/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified .vs/IA Videojuegos/v15/sqlite3/storage.ide
Binary file not shown.
133 changes: 127 additions & 6 deletions Assets/scenes/Level_1.unity

Large diffs are not rendered by default.

21 changes: 13 additions & 8 deletions Assets/scripts/EnemyScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

public class EnemyScript : MonoBehaviour
{
public float initx;
public float inity;
public float angSpeed = 5f;
public float velocity = 1.0f;
public float minSpeed = 1.0f;
public float maxSpeed = 4.0f;
public float stop = 1f;
Expand All @@ -29,6 +25,15 @@ public class EnemyScript : MonoBehaviour
private Vector3 direction, target;
private NavMeshScript navmeshScript;

// State machine variables
public float initx;
public float inity;
public float angSpeed = 5f;
public float velocity = 1.0f;
public bool targetSpotted = false;
public bool smellDetected = false;
public bool targetScaped = true;

private void Start()
{
initx = transform.localScale.x;
Expand All @@ -47,7 +52,7 @@ private void Start()

private void Update()
{
// if not path following, choose behaviors
/* if not path following, choose behaviors
if (switcher != 9){
target = player.transform.position;
direction = target - transform.position;
Expand Down Expand Up @@ -85,7 +90,7 @@ private void Update()
switcher = 9;
//"Follow Path";
}
}
}*/
// weapon activated, shoot
if (weapon.enabled){
shoot();
Expand All @@ -101,7 +106,7 @@ private void Update()
//"Follow Path"
pathFollowing();
break;
case 8:
/*case 8:
//"Pursue"
pursue(direction);
break;
Expand Down Expand Up @@ -135,7 +140,7 @@ private void Update()
case 1:
//"Alinear"
align();
break;
break;*/
default:
break;
}
Expand Down
2 changes: 2 additions & 0 deletions Assets/scripts/NodeScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
public class NodeScript : MonoBehaviour {
public GameObject[] conections;
public bool active = true;
public int smellLevel = 0;
public string smellType = "";

// Use this for initialization
void Start () {
Expand Down
1 change: 1 addition & 0 deletions Assets/scripts/PlayerScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class PlayerScript : MonoBehaviour {
public bool jumping = false;
private Vector3 gravity;
public Rigidbody rb;
public bool visible = true;

// Use this for initialization
void Start () {
Expand Down

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Library/CurrentLayout.dwlt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ MonoBehaviour:
m_MinSize: {x: 887, y: 492}
m_MaxSize: {x: 22012, y: 14042}
vertical: 0
controlID: 46
controlID: 169
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
Expand Down Expand Up @@ -159,7 +159,7 @@ MonoBehaviour:
m_MinSize: {x: 408, y: 492}
m_MaxSize: {x: 14008, y: 14042}
vertical: 1
controlID: 47
controlID: 135
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -183,7 +183,7 @@ MonoBehaviour:
m_MinSize: {x: 408, y: 221}
m_MaxSize: {x: 8008, y: 4021}
vertical: 0
controlID: 48
controlID: 70
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
Expand Down Expand Up @@ -441,7 +441,7 @@ MonoBehaviour:
height: 710
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_SelectedIDs: 52050000
m_LastClickedID: 0
m_ExpandedIDs: e6fbffff00000000
m_RenameOverlay:
Expand Down Expand Up @@ -670,7 +670,7 @@ MonoBehaviour:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 0
m_HadKeyboardFocusLastEvent: 1
m_ExpandedInstanceIDs: 8025000076250000d4f7ffff00000000f6240000fa24000068c2ffff
m_RenameOverlay:
m_UserAcceptedRename: 0
Expand Down
6 changes: 3 additions & 3 deletions Library/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ PlayerSettings:
UNet: 1
facebookSdkVersion: 7.9.1
apiCompatibilityLevel: 2
cloudProjectId:
projectName:
organizationId:
cloudProjectId: 3e1c516f-e2a8-401a-9087-d8567273424e
projectName: IA Videojuegos
organizationId: gabillo
cloudEnabled: 0
enableNewInputSystem: 0
Binary file modified Library/ScriptAssemblies/Assembly-CSharp.dll
Binary file not shown.
Binary file modified Library/ScriptAssemblies/Assembly-CSharp.dll.mdb
Binary file not shown.
Binary file modified Library/assetDatabase3
Binary file not shown.
Binary file modified Library/metadata/00/00000000000000004000000000000000
Binary file not shown.
Binary file modified Library/metadata/19/19f1d72145022454a981026226a3b9ed
Binary file not shown.
Binary file modified Library/metadata/65/6569b9b712285084ab8a73ea8f5ac50c
Binary file not shown.
Binary file modified Library/metadata/8b/8b7e5856fc65c764091ce395f6ac1b0b
Binary file not shown.
6 changes: 3 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,8 @@ PlayerSettings:
UNet: 1
facebookSdkVersion: 7.9.1
apiCompatibilityLevel: 2
cloudProjectId:
projectName:
organizationId:
cloudProjectId: 3e1c516f-e2a8-401a-9087-d8567273424e
projectName: IA Videojuegos
organizationId: gabillo
cloudEnabled: 0
enableNewInputSystem: 0

0 comments on commit 9734f6b

Please sign in to comment.