-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mogoson
committed
Dec 9, 2022
1 parent
358e703
commit 4b9f40b
Showing
10 changed files
with
139 additions
and
35 deletions.
There are no files selected for viewing
Binary file added
BIN
+16.6 KB
UnityProject/Assets/MGS.Packages/Chain/Demo/Scenes/HermiteChainMotion.unity
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
UnityProject/Assets/MGS.Packages/Chain/Demo/Scenes/HermiteChainMotion.unity.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
UnityProject/Assets/MGS.Packages/Chain/Demo/Scripts/CurveChainDriver.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/************************************************************************* | ||
* Copyright © 2022 Mogoson. All rights reserved. | ||
*------------------------------------------------------------------------ | ||
* File : CurveChainDriver.cs | ||
* Description : CurveChainDriver component. | ||
*------------------------------------------------------------------------ | ||
* Author : Mogoson | ||
* Version : 0.1.0 | ||
* Date : 12/09/2022 | ||
* Description : Initial development version. | ||
*************************************************************************/ | ||
|
||
using UnityEngine; | ||
|
||
namespace MGS.Chain.Demo | ||
{ | ||
public class CurveChainDriver : MonoBehaviour | ||
{ | ||
public MonoCurveChain chain; | ||
public float velocity = 0.15f; | ||
|
||
void Update() | ||
{ | ||
if (Input.GetKey(KeyCode.P)) | ||
{ | ||
chain.Drive(velocity * Time.deltaTime); | ||
} | ||
else if (Input.GetKey(KeyCode.N)) | ||
{ | ||
chain.Drive(-velocity * Time.deltaTime); | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
UnityProject/Assets/MGS.Packages/Chain/Demo/Scripts/CurveChainDriver.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters