Git merge something
This commit is contained in:
parent
3e0fe60e7a
commit
c422045fcf
3 changed files with 20 additions and 3 deletions
|
@ -42,7 +42,7 @@ Camera:
|
|||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
|
@ -59,7 +59,7 @@ Camera:
|
|||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
orthographic size: 7
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
|
|
|
@ -46,8 +46,13 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
hpMax: 0
|
||||
hp: 0
|
||||
<<<<<<< Updated upstream
|
||||
sprite: {fileID: 21300000, guid: ee7ef72c830dc204c9df0595e161f049, type: 3}
|
||||
visionRange: 4
|
||||
=======
|
||||
sprite: {fileID: 21300000, guid: 0121970e693ee0a4d987bd5fe694ad67, type: 3}
|
||||
visionRange: 2.5
|
||||
>>>>>>> Stashed changes
|
||||
--- !u!212 &1351652798109185028
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -14,7 +14,19 @@ public class AISlime : AI
|
|||
|
||||
public override void OnTurn(){
|
||||
if (CanSeePlayer()){
|
||||
//TODO
|
||||
Vector2Int distance = player.MapPosition - MapPosition;
|
||||
if (distance.x < 0 && map.CanMoveTo(MapPosition + Vector2Int.left)){
|
||||
transform.Translate(Vector3.left);
|
||||
}
|
||||
else if (distance.x > 0 && map.CanMoveTo(MapPosition + Vector2Int.right)){
|
||||
transform.Translate(Vector3.right);
|
||||
}
|
||||
else if (distance.y > 0 && map.CanMoveTo(MapPosition + Vector2Int.up)){
|
||||
transform.Translate(Vector3.up);
|
||||
}
|
||||
else if (distance.y < 0 && map.CanMoveTo(MapPosition + Vector2Int.down)){
|
||||
transform.Translate(Vector3.down);
|
||||
}
|
||||
}
|
||||
else {
|
||||
int direction = Random.Range(0, 4);
|
||||
|
|
Loading…
Reference in a new issue