Commit eafd6b38 authored by mmaluschnig's avatar mmaluschnig
Browse files

changing up the way character gameobjects are layed out to prevent canvas from...

changing up the way character gameobjects are layed out to prevent canvas from flipping when character flips. still in progress...
parent 3a3a46a8
......@@ -406,7 +406,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4057871787717216, guid: a71e7603ca1b4481291e1bfd11bf57d6, type: 2}
propertyPath: m_RootOrder
value: 1
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a71e7603ca1b4481291e1bfd11bf57d6, type: 2}
......@@ -630,7 +630,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &827663220
RectTransform:
m_ObjectHideFlags: 0
......@@ -647,7 +647,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -60}
m_AnchoredPosition: {x: 0, y: -80}
m_SizeDelta: {x: 60, y: 60}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &827663221
......@@ -762,7 +762,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4662323854503996, guid: c26ff785dae05414ab438c90c1da3022, type: 2}
propertyPath: m_RootOrder
value: 2
value: 3
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c26ff785dae05414ab438c90c1da3022, type: 2}
......@@ -997,31 +997,31 @@ Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1936604887}
m_TransformParent: {fileID: 1603416592}
m_Modifications:
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalPosition.x
value: -2.83289
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalPosition.y
value: -1.14
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalPosition.z
value: 0.20703125
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalRotation.x
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalRotation.y
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalRotation.z
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4490612100453362, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
propertyPath: m_LocalRotation.w
......@@ -1031,26 +1031,11 @@ Prefab:
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 61809397451393846, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
- {fileID: 114803991258325674, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
m_SourcePrefab: {fileID: 100100000, guid: 49c8478baca8d47be993db0c6427da2e, type: 2}
m_IsPrefabAsset: 0
--- !u!1 &1470914922 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 1993203501856666, guid: 49c8478baca8d47be993db0c6427da2e,
type: 2}
m_PrefabInternal: {fileID: 1385975288}
--- !u!114 &1470914926
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1470914922}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96b94b7db1e214148bb51ddcb027474a, type: 3}
m_Name:
m_EditorClassIdentifier:
interactButton: {fileID: 827663221}
--- !u!1 &1554845410
GameObject:
m_ObjectHideFlags: 0
......@@ -1202,6 +1187,88 @@ SpriteRenderer:
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &1603416591
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1603416592}
- component: {fileID: 1603416595}
- component: {fileID: 1603416594}
- component: {fileID: 1603416593}
m_Layer: 0
m_Name: AhavaBaird
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1603416592
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1603416591}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.38, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2051215885}
- {fileID: 2134632993}
m_Father: {fileID: 1936604887}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1603416593
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1603416591}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 96b94b7db1e214148bb51ddcb027474a, type: 3}
m_Name:
m_EditorClassIdentifier:
interactButton: {fileID: 827663221}
--- !u!114 &1603416594
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1603416591}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c41dca42caf14e17b64ff95fd032786, type: 3}
m_Name:
m_EditorClassIdentifier:
wandering: 1
--- !u!61 &1603416595
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1603416591}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.06, y: -0.34}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 2.56, y: 3.5}
newSize: {x: 2.56, y: 3.5}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 3.2, y: 2.57}
m_EdgeRadius: 0
--- !u!1 &1748254579
GameObject:
m_ObjectHideFlags: 0
......@@ -1378,7 +1445,7 @@ Transform:
m_LocalPosition: {x: 0, y: -2.7, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2051215885}
- {fileID: 1603416592}
- {fileID: 565341452}
- {fileID: 2059277723}
m_Father: {fileID: 0}
......@@ -1419,16 +1486,16 @@ RectTransform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2134632992}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.20703125}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.01, y: 0.01, z: 1}
m_Children:
- {fileID: 827663220}
m_Father: {fileID: 2051215885}
m_RootOrder: 0
m_Father: {fileID: 1603416592}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0.09, y: 2.55}
m_AnchoredPosition: {x: 0, y: 2.5}
m_SizeDelta: {x: 400, y: 300}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2134632994
......
......@@ -16,15 +16,26 @@ public class AhavaScript : MonoBehaviour {
// Update is called once per frame
void Update () {
if(!moveScript.wandering){
checkInteractable();
//do things while the player is in range of the character
if(interactable){
if(Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow)){
print("Hello Player, I am Ahava");
}
}
}
void checkInteractable(){
if (!moveScript.wandering)
{
interactable = true;
interactButton.gameObject.SetActive(true);
}else{
}
else
{
interactable = false;
interactButton.gameObject.SetActive(false);
}
}
}
}
Supports Markdown
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