Skip to content

Commit

Permalink
style: player skin
Browse files Browse the repository at this point in the history
x wing like skin for the player
  • Loading branch information
MrXMrQ committed Aug 20, 2024
1 parent 006c172 commit 386f102
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 13 deletions.
16 changes: 10 additions & 6 deletions Assets/Prefabs/Player Adition/Clone/clone.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 6111668740038467412}
- component: {fileID: 8181934081239502409}
- component: {fileID: 3474101802904519079}
- component: {fileID: 5954124179205527272}
- component: {fileID: -8413929271804821928}
- component: {fileID: -2376178413195141671}
m_Layer: 0
m_Name: clone
Expand Down Expand Up @@ -228,8 +228,8 @@ Rigidbody2D:
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!61 &5954124179205527272
BoxCollider2D:
--- !u!60 &-8413929271804821928
PolygonCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
Expand Down Expand Up @@ -270,9 +270,13 @@ BoxCollider2D:
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
m_Points:
m_Paths:
- - {x: -0.5, y: 0.5}
- {x: -0.5, y: -0.5}
- {x: 0.5, y: -0.5}
- {x: 0.5, y: 0.5}
m_UseDelaunayMesh: 0
--- !u!114 &-2376178413195141671
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
7 changes: 6 additions & 1 deletion Assets/Scripts/Player/Ability/AbilityHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class AbilityHolder : MonoBehaviour
{
public Ability ability;
[HideInInspector] public Ability ability;
[SerializeField] AbilityCooldownLogic ability_cooldown_logic;
float cooldown;
float duration;
Expand Down Expand Up @@ -72,6 +72,11 @@ private void Load()
Debug.LogError("Failed to load weapon prefab from path: " + path);
}

if (ability is Clone clone)
{
clone._clone_is_alive = false;
}

ability.COOLDOWN = ability.DEFAULT_COOLDOWN;
Debug.Log(ability.name);
}
Expand Down
1 change: 1 addition & 0 deletions Assets/Scripts/Player/Ability/Clone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private IEnumerator SmoothMove(Transform playerTransform, Transform cloneTransfo
{
cloneTransform.position = targetClonePosition;
clone_controller._max_distance = (playerTransform.position - cloneTransform.position).magnitude;
Debug.Log(clone_controller._max_distance);
}
}
}
8 changes: 8 additions & 0 deletions Assets/Sprites/Player.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/Sprites/Player/pixil-frame-0 (8).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Assets/Sprites/pixil-frame-0.png
Binary file not shown.
10 changes: 5 additions & 5 deletions Assets/scenes/level/endless_game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -3680,7 +3680,7 @@ BoxCollider2D:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
newSize: {x: 7.04, y: 7.04}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
Expand Down Expand Up @@ -3756,12 +3756,12 @@ SpriteRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 2
m_Sprite: {fileID: 21300000, guid: 6908243f5aa587e48b9e13214cd08537, type: 3}
m_Sprite: {fileID: 21300000, guid: e793bceebe390d04591a4148bcdf816a, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_Size: {x: 7.04, y: 7.04}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
Expand Down Expand Up @@ -3994,7 +3994,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: a87e062a0f8e6684ba15a71ecaeed2f9, type: 3}
m_Name:
m_EditorClassIdentifier:
ability: {fileID: 11400000, guid: 68ceb1490e65e3c44a78cc7faeae6039, type: 2}
ability: {fileID: 11400000, guid: 0db5dd8a884ee374b93ccce2878f8439, type: 2}
ability_cooldown_logic: {fileID: 1810199181}
--- !u!1 &761391652
GameObject:
Expand Down Expand Up @@ -9158,7 +9158,7 @@ MonoBehaviour:
- {fileID: 2659891126375243337, guid: 067cc3cd33e837946b4e8fa1d3674f16, type: 3}
- {fileID: 2659891126375243337, guid: c8f08c08be19ab84dae3878d2600ff4b, type: 3}
- {fileID: 2659891126375243337, guid: 30048925a3833824282fbf6273c30173, type: 3}
spawn_rate: 0.5
spawn_rate: 100000000
score_to_spawn_boss: 10000
increse_score_to_spawn_boss: 200
boss_healthbar: {fileID: 1810199179}
Expand Down

0 comments on commit 386f102

Please sign in to comment.