Skip to content

Commit

Permalink
last
Browse files Browse the repository at this point in the history
  • Loading branch information
kruserr committed Sep 12, 2021
1 parent baee37a commit ccf60bb
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 68 deletions.
27 changes: 0 additions & 27 deletions Assets/Homework.cs

This file was deleted.

14 changes: 7 additions & 7 deletions Assets/Scenes/StartMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: 98.26652}
m_SizeDelta: {x: -679.873, y: -328.3126}
m_AnchoredPosition: {x: 20, y: 133.32765}
m_SizeDelta: {x: -712.5967, y: -398.4349}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &74648443
MonoBehaviour:
Expand Down Expand Up @@ -920,7 +920,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: 21}
m_SizeDelta: {x: -662.8741, y: -323.7281}
m_SizeDelta: {x: -670.53, y: -381.3842}
m_Pivot: {x: 0, y: 0}
--- !u!114 &1080623135
MonoBehaviour:
Expand Down Expand Up @@ -1064,8 +1064,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: -60.466934}
m_SizeDelta: {x: -577.8792, y: -334.5981}
m_AnchoredPosition: {x: 20, y: -28.1328}
m_SizeDelta: {x: -658.9094, y: -399.2664}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1083560762
MonoBehaviour:
Expand Down Expand Up @@ -1361,8 +1361,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 20, y: 17}
m_SizeDelta: {x: -605.0816, y: -334.2307}
m_AnchoredPosition: {x: 20, y: 50.5029}
m_SizeDelta: {x: -670.5291, y: -401.2364}
m_Pivot: {x: 0, y: 0.5}
--- !u!114 &1424485927
MonoBehaviour:
Expand Down
9 changes: 6 additions & 3 deletions Assets/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ public void Item8()

void AttachDecorator(string name)
{
var comp = new PlayerDecoratorFactory(this.adapterComponent, this).generate(name);
this.stats = comp.extend();
this.health = this.stats.health;
if (this.currentSP >= 1)
{
var comp = new PlayerDecoratorFactory(this.adapterComponent, this).generate(name);
this.stats = comp.extend();
this.health = this.stats.health;
}
}

void HandleBuyMenu()
Expand Down
28 changes: 14 additions & 14 deletions Assets/Scripts/PlayerCenterGravity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ void Update()

private void OnTriggerEnter2D(Collider2D other)
{
// Debug.Log("AM TRIGGERING");
// Player player;
// Enemy enemy;
// if (isPlayer)
// {
// player = gameObject.GetComponent<Player>();
// enemy = other.gameObject.GetComponent<Enemy>();
//
// if ((player != null && enemy != null) && (player.size > enemy.size))
// {
// player.IncreaseCurrentXP(enemy.xpGains);
// Destroy(other.gameObject);
// }
// }
Debug.Log("AM TRIGGERING");
Player player;
Enemy enemy;
if (isPlayer)
{
player = gameObject.GetComponent<Player>();
enemy = other.gameObject.GetComponent<Enemy>();

if ((player != null && enemy != null) && (player.size > enemy.size))
{
player.IncreaseCurrentXP(enemy.xpGains);
Destroy(other.gameObject);
}
}
}
}
2 changes: 1 addition & 1 deletion Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://packages.unity.com"
},
"com.unity.2d.path": {
"version": "4.0.1",
"version": "4.0.2",
"depth": 1,
"source": "registry",
"dependencies": {},
Expand Down
28 changes: 14 additions & 14 deletions ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ EditorBuildSettings:
path:
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Scenes/Buy Menu.unity
guid: d5178fe27dda65142ab40d7231b19540
path: Assets/Scenes/StartMenu.unity
guid: 533f93825e5869b45b33960495dec0fb
- enabled: 1
path: Assets/Scenes/Tutorial.unity
guid: 7aa9d638d7851cf4d96b100c7bc4390f
- enabled: 1
path: Assets/Scenes/Credits.unity
guid: fd897ff3cc3137f40a972c799ee2b3dd
- enabled: 1
path: Assets/Scenes/Game.unity
guid: 8d179cb8f1ecb379796181f713f5ba70
- enabled: 1
path: Assets/Scenes/Game2.unity
guid: 8575493de770b918b8b966252c24fa6e
- enabled: 1
path: Assets/Scenes/Game3.unity
guid: 6ec8ad30ee35056378d51362a520502b
- enabled: 1
path: Assets/Scenes/Buy Menu.unity
guid: d5178fe27dda65142ab40d7231b19540
- enabled: 0
path: Assets/Scenes/Game.unity
guid: 8d179cb8f1ecb379796181f713f5ba70
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 0
path: Assets/Scenes/Game4.unity
guid: eede10ad7b409a60a8df3d3d71e4e320
- enabled: 1
path: Assets/Scenes/StartMenu.unity
guid: 533f93825e5869b45b33960495dec0fb
- enabled: 1
path: Assets/Scenes/Tutorial.unity
guid: 7aa9d638d7851cf4d96b100c7bc4390f
m_configObjects: {}
4 changes: 2 additions & 2 deletions UserSettings/EditorUserSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c78111b12563f22213229
flags: 0
RecentlyUsedScenePath-7:
value: 22424703114646680e0b0227036c6c0417050c072926337e38271427fb
value: 22424703114646680e0b0227036c78111b124c6439262f2434
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c78111b124c6439262f2434
value: 22424703114646680e0b0227036c6c0417050c072926337e38271427fb
flags: 0
RecentlyUsedScenePath-9:
value: 22424703114646680e0b0227036c78111b124b6439262f2434
Expand Down

0 comments on commit ccf60bb

Please sign in to comment.