-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from SUSTech-CANStudio/current-work
Current work
- Loading branch information
Showing
24 changed files
with
275 additions
and
320 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
Packages/bullet-storm-unity/Scripts/Runtime/BulletSystem/BulletParam.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,38 @@ | ||
using UnityEngine; | ||
|
||
namespace CANStudio.BulletStorm.BulletSystem | ||
{ | ||
/// <summary> | ||
/// All accessible parameters of a bullet in <see cref="IBulletController"/>. | ||
/// </summary> | ||
public struct BulletParam | ||
{ | ||
/// <summary> | ||
/// Rotation is also the speed direction of a bullet. | ||
/// </summary> | ||
public Quaternion rotation; | ||
|
||
/// <summary> | ||
/// Position in world space. | ||
/// </summary> | ||
public Vector3 position; | ||
|
||
/// <summary> | ||
/// Speed of the bullet, negative values represents a velocity towards negative direction. | ||
/// </summary> | ||
public float speed; | ||
|
||
/// <summary> | ||
/// Scaled time from emission. | ||
/// </summary> | ||
public readonly float lifetime; | ||
|
||
internal BulletParam(Quaternion rotation, Vector3 position, float speed, float lifetime) | ||
{ | ||
this.rotation = rotation; | ||
this.position = position; | ||
this.speed = speed; | ||
this.lifetime = lifetime; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Packages/bullet-storm-unity/Scripts/Runtime/BulletSystem/BulletParam.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
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
Oops, something went wrong.