Skip to content

Commit

Permalink
change some namings
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilienNaveau committed May 1, 2024
1 parent ef42b00 commit 8750cc9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 37 deletions.
34 changes: 5 additions & 29 deletions trampoline/Assets/Scenes/solo_game_scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,6 @@ GameObject:
m_Component:
- component: {fileID: 198592477}
- component: {fileID: 198592481}
- component: {fileID: 198592480}
- component: {fileID: 198592479}
- component: {fileID: 198592478}
m_Layer: 5
Expand Down Expand Up @@ -840,29 +839,6 @@ MonoBehaviour:
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &198592480
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 198592476}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &198592481
Canvas:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1535,7 +1511,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &408914949
PrefabInstance:
Expand Down Expand Up @@ -2272,7 +2248,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &703742990
GameObject:
Expand Down Expand Up @@ -2463,7 +2439,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &894486571
GameObject:
Expand Down Expand Up @@ -5859,7 +5835,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1650044515
MonoBehaviour:
Expand Down Expand Up @@ -7308,7 +7284,7 @@ RectTransform:
m_Children:
- {fileID: 198592477}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
Expand Down
10 changes: 3 additions & 7 deletions trampoline/Assets/Scripts/BasicToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using UnityEngine.UI;
using UnityEngine.Assertions;

public class BasicToken : MonoBehaviour, IPointerDownHandler, IBeginDragHandler, IEndDragHandler, IDragHandler, IPointerClickHandler
public class BasicToken : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDragHandler, IPointerClickHandler
{
// Drag and drop variables
private Vector2 startDragPosition_ = new Vector2(0f, 0f);
Expand Down Expand Up @@ -90,10 +90,6 @@ public void OnEndDrag(PointerEventData eventData)
}
}

public void OnPointerDown(PointerEventData eventData)
{
}

public void SetDraggedOnTile(bool draggedOnTile)
{
draggedOnTile_ = draggedOnTile;
Expand All @@ -105,12 +101,12 @@ public void OnPointerClick(PointerEventData eventData)

if (clickCount_ == 2)
{
StartCoroutine(this.Wait());
StartCoroutine(this.FlipToken());
}

}

IEnumerator Wait()
IEnumerator FlipToken()
{
Vector3 initScale = transform.localScale;
float size = initScale.x;
Expand Down
2 changes: 1 addition & 1 deletion trampoline/Assets/Scripts/Store.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void OnDrop(PointerEventData eventData)
BasicToken token = eventData.pointerDrag.GetComponent<BasicToken>();
token.SetDraggedOnTile(false);
token.SwapTileUnder(null);
token.SetInBoard(false);
token.SetInBoard(false);
// Update the game status.
gameController_.AskUpdate();
}
Expand Down

0 comments on commit 8750cc9

Please sign in to comment.