Skip to content

Commit

Permalink
add skin support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tualin14 committed Aug 18, 2023
1 parent 54a0861 commit 590a232
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Assets/ArisStudio/Components/Button/ButtonLight1.mat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Material:
- _Length: 0.351
- _Size: 0.2
- _Speed: 10
- _StartAngle: 149.29335
- _StartAngle: 241.51262
m_Colors:
- _BorderColor: {r: 32, g: 32, b: 32, a: 1}
2 changes: 1 addition & 1 deletion Assets/ArisStudio/Components/Button/ButtonLight2.mat
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Material:
- _Length: 0.3
- _Size: 0.2
- _Speed: 10
- _StartAngle: 329.2934
- _StartAngle: 60.152496
m_Colors:
- _BorderColor: {r: 32, g: 32, b: 32, a: 1}
3 changes: 2 additions & 1 deletion Assets/ArisStudio/MainControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void SetPlay()
}

isPlaying = true;
debugConsole.PrintLog("Play Once");
// debugConsole.PrintLog("Play Once");
}

public void SetTyping(bool b)
Expand All @@ -178,6 +178,7 @@ public void SetSelect(string tName)
{
runLineNumber = targetList[tName];
isSelecting = false;
isPlaying = true;
debugConsole.PrintLog($"Select: <color=lime>{tName}</color>");
}

Expand Down
5 changes: 5 additions & 0 deletions Assets/ArisStudio/Spr/SprFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ private void SCommand(string sCommand)
ssList[l[1]].GetComponent<SprState>().HighLight(float.Parse(l[3]));
break;
}
case "skin":
{
ssList[l[1]].GetComponent<SprState>().SetSkin(l[3]);
break;
}
case "state":
{
ssList[l[1]].GetComponent<SprState>().SetState(l[3]);
Expand Down
7 changes: 7 additions & 0 deletions Assets/ArisStudio/Spr/SprState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ public void HighLight(float f)
}
}

public void SetSkin(string skinName)
{
if (!isSpr) return;
sa.skeleton.SetSkin(skinName);
sa.skeleton.SetSlotsToSetupPose();
}

public void SetState(string stateName)
{
if (isSpr)
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.2.24
bundleVersion: 0.2.25
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 590a232

Please sign in to comment.