Large diffs are not rendered by default.

@@ -85,52 +85,6 @@ NavMeshSettings:
cellSize: 0.16666667
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &20312025
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.x
value: 12.05
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.y
value: -2.93
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 11442422, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: ws
value:
objectReference: {fileID: 1798098532}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &23706000
Prefab:
m_ObjectHideFlags: 0
@@ -234,10 +188,6 @@ Prefab:
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 117472, guid: a78ce730cd9f01c4aaed28672bd77bf9, type: 2}
propertyPath: m_TagString
value: Canvas
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: a78ce730cd9f01c4aaed28672bd77bf9, type: 2}
m_IsPrefabParent: 0
@@ -355,12 +305,12 @@ Transform:
--- !u!1 &357338940 stripped
GameObject:
m_PrefabParentObject: {fileID: 143700, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
m_PrefabInternal: {fileID: 20312025}
m_PrefabInternal: {fileID: 557525126}
--- !u!114 &357338944 stripped
MonoBehaviour:
m_PrefabParentObject: {fileID: 11490258, guid: 7b1bc5d1014caf24581c3b687452f4bd,
type: 2}
m_PrefabInternal: {fileID: 20312025}
m_PrefabInternal: {fileID: 557525126}
m_Script: {fileID: 11500000, guid: bee737fd7511a4d4e924e80e8342034c, type: 3}
--- !u!1001 &543068634
Prefab:
@@ -404,7 +354,73 @@ Prefab:
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: f399629987905844782c45dc6dcb8607, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1502220686
--- !u!1001 &557525126
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.x
value: 12.05
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.y
value: -2.93
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 441052, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 11442422, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: ws
value:
objectReference: {fileID: 1798098532}
- target: {fileID: 410708, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410708, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 410708, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 410708, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5052326, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
propertyPath: m_IsKinematic
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 7b1bc5d1014caf24581c3b687452f4bd, type: 2}
m_IsPrefabParent: 0
--- !u!1001 &1229209321
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
@@ -443,6 +459,10 @@ Prefab:
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 11493766, guid: 074401f6d3776934ca5012d7efad714d, type: 2}
propertyPath: player
value:
objectReference: {fileID: 357338940}
- target: {fileID: 11474536, guid: 074401f6d3776934ca5012d7efad714d, type: 2}
propertyPath: ws
value:
@@ -467,6 +487,14 @@ Prefab:
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6159848, guid: 074401f6d3776934ca5012d7efad714d, type: 2}
propertyPath: m_IsTrigger
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5043884, guid: 074401f6d3776934ca5012d7efad714d, type: 2}
propertyPath: m_IsKinematic
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 074401f6d3776934ca5012d7efad714d, type: 2}
m_IsPrefabParent: 0
@@ -15,11 +15,13 @@ void Start ()
// Update is called once per frame
void Update ()
{
if (player)
{
transform.position = new Vector3(player.transform.position.x, transform.position.y, transform.position.z);
if (transform.position.x < 9.35f)
transform.position = new Vector3(9.35f, transform.position.y, transform.position.z);
else if (transform.position.x > (9.35f + 20.48f * (ws.numScreens - 1)))
transform.position = new Vector3(9.35f + 20.48f * (ws.numScreens - 1), transform.position.y, transform.position.z);

}
}
}
@@ -10,11 +10,36 @@ public class AIController : MonoBehaviour {
void Start ()
{
p = GetComponent<Pawn>();
player = GameObject.FindGameObjectWithTag("Player");
}

// Update is called once per frame
void Update ()
{

if (!player)
return;
Vector3 towardPlayer = player.transform.position - transform.position;

float horizontal = 0;
float vertical = 0;

if (towardPlayer.magnitude > 5)
{
if (towardPlayer.x > 1)
horizontal = 1;
else if (towardPlayer.x < -1)
horizontal = -1;

if (towardPlayer.y > 1)
vertical = 1;
else if (towardPlayer.y < -1)
vertical = -1;

p.Move(horizontal, vertical);
}
else
{
p.Attack();
}
}
}
@@ -13,6 +13,11 @@ void Start()
rb = GetComponent<Rigidbody2D>();
}

void Update()
{
rb.velocity = Vector3.zero;
}

public void Move(float horizontal, float vertical)
{
Vector2 dir = new Vector2(horizontal, vertical).normalized * stats.speed;
@@ -26,10 +26,14 @@ void Start()
//sr = GetComponent<SpriteRenderer>();
stats = GetComponent<CharacterStats>();
interactables = new HashSet<Transform>();

swordHitbox.SetActive(false);
shieldHitbox.SetActive(false);
}

void Update()
{

/*if (currentState == state.idle)
sr.color = Color.white;
else if (currentState == state.walk)
@@ -1,8 +1,5 @@
using UnityEngine;
using System.Collections;

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class spritePerspective : MonoBehaviour {
@@ -11,7 +8,7 @@ public class spritePerspective : MonoBehaviour {
private List<SpriteRenderer> sprc;
private Bounds maxbounds;

void Start() {
void Awake() {
spr = GetComponent<SpriteRenderer>();
sprc = new List<SpriteRenderer>();
foreach (SpriteRenderer sp in GetComponentsInChildren<SpriteRenderer>()) {