Commit 34405def authored by 18손재민's avatar 18손재민

Merge branch 'interact'

# Conflicts:
#	Assets/Scripts/Interactors/Mannequin.cs
parents 6e8b713f 6db8638a
......@@ -92,7 +92,7 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1244481854748732982}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.0000005, y: 1.0000002, z: 0.080003634}
......
......@@ -89,7 +89,7 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 337530617404887312}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.0000005, y: 1.0000002, z: 0.080003634}
......
......@@ -89,6 +89,7 @@ GameObject:
- component: {fileID: 6001025753464593565}
- component: {fileID: 439939669}
- component: {fileID: 896145114}
- component: {fileID: 3778247420154791817}
m_Layer: 0
m_Name: camera
m_TagString: Untagged
......@@ -144,6 +145,20 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
floor: {fileID: 0}
--- !u!136 &3778247420154791817
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6001025753464815805}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
m_Radius: 0.25
m_Height: 0.03
m_Direction: 1
m_Center: {x: 0, y: 0.45, z: 0}
--- !u!1 &6001025753464815807
GameObject:
m_ObjectHideFlags: 0
......
......@@ -38,6 +38,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
_color = value;
}
}
public bool isWhite;
public void Interact(Bullet bullet)
{
......@@ -69,6 +70,7 @@ public class Mannequin : MonoBehaviour, IObject, IBulletInteractor
public void SetColor(bool isWhite)
{
Color = isWhite ? Color.white : Color.black;
this.isWhite = isWhite;
if (GameManager.white >= 0 && isWhite)
MapManager.inst.currentMap.clearConditions[GameManager.white].IsDone(1);
if (GameManager.black >= 0 && !isWhite)
......
This diff is collapsed.
......@@ -15,13 +15,13 @@ public class Wall : MonoBehaviour
/// Position of this floor at the map.
/// </summary>
public Vector2 mapPos;
public Vector2Int ldPos // left down pos
public Vector2 ldPos // left down pos
{
get { return new Vector2Int((int)mapPos.x, (int)mapPos.y); }
get { return new Vector2(dir ? mapPos.x - 0.5f : mapPos.x , !dir ? mapPos.y - 0.5f : mapPos.y); }
}
public Vector2Int rdPos // right down pos
public Vector2 rdPos // right down pos
{
get { return ldPos + (dir ? new Vector2Int(len, 0) : new Vector2Int(0, len)); }
get { return ldPos + (dir ? new Vector2(len, 0) : new Vector2(0, len)); }
}
public bool dir // false: ver, true: hor
{
......@@ -29,16 +29,4 @@ public class Wall : MonoBehaviour
}
public int len = 1; // length of wall
public WallType type;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
......@@ -5,9 +5,9 @@ using UnityEngine.AI;
public class Player : MonoBehaviour
{
public Vector2Int pos
public Vector2 pos
{
get { return new Vector2Int((int)transform.position.x, (int)transform.position.y); }
get { return new Vector2(currentFloor.mapPos.x, currentFloor.mapPos.y); }
}
Coroutine playerArrivalCheck;
......
......@@ -70,21 +70,16 @@ public class PlayerController : SingletonBehaviour<PlayerController>
void Start()
{
prePos = MapPos;
bulletList.Add(BulletCode.True);
bulletList.Add(BulletCode.True);
bulletList.Add(BulletCode.True);
bulletList.Add(BulletCode.True);
bulletList.Add(BulletCode.True);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
bulletList.Add(BulletCode.Mirror);
bulletList.Add(BulletCode.False);
}
// Update is called once per frame
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment