gg.easy.airship 0.1.2145 → 0.1.2147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  // ReSharper disable InconsistentNaming
2
2
  namespace Code {
3
3
  public static class AirshipConst {
4
- public const int playerVersion = 9;
4
+ public const int playerVersion = 10;
5
5
 
6
6
  /// <summary>
7
7
  /// The server will kick clients that have a playerVersion lower than this value.
8
8
  /// </summary>
9
- public const int minAcceptedPlayerVersionOnServer = 9;
9
+ public const int minAcceptedPlayerVersionOnServer = 10;
10
10
  }
11
11
  }
@@ -53,7 +53,8 @@
53
53
  "GUID:3b5390adca4e2bb4791cb930316d6f3e",
54
54
  "GUID:725ee7191c021de4dbf9269590ded755",
55
55
  "GUID:2a0340569ab0e1245a38e0d6c7b2529b",
56
- "GUID:befe48b9a36afc04ea625c93daad910e"
56
+ "GUID:befe48b9a36afc04ea625c93daad910e",
57
+ "GUID:21d1eb854b91ade49bc69a263d12bee2"
57
58
  ],
58
59
  "includePlatforms": [],
59
60
  "excludePlatforms": [],
@@ -22,7 +22,8 @@
22
22
  "GUID:15fc0a57446b3144c949da3e2b9737a9",
23
23
  "GUID:ec266f293c0b4f6c9d06847488a52a0c",
24
24
  "GUID:325984b52e4128546bc7558552f8b1d2",
25
- "GUID:befe48b9a36afc04ea625c93daad910e"
25
+ "GUID:befe48b9a36afc04ea625c93daad910e",
26
+ "GUID:21d1eb854b91ade49bc69a263d12bee2"
26
27
  ],
27
28
  "includePlatforms": [],
28
29
  "excludePlatforms": [],
@@ -14,6 +14,7 @@ using UnityEngine.Experimental.Rendering;
14
14
  using UnityEngine.Rendering;
15
15
  using UnityEngine.Rendering.Universal;
16
16
  using UnityEngine.SceneManagement;
17
+ using UnityEngine.Splines;
17
18
  using UnityEngine.UI;
18
19
  using UnityEngine.UIElements;
19
20
  using LightType = UnityEngine.LightType;
@@ -184,6 +185,12 @@ namespace Luau {
184
185
  [typeof(MeshFilter)] = LuauContextAll,
185
186
  [typeof(Sprite)] = LuauContextAll,
186
187
  [typeof(DecalProjector)] = LuauContextAll,
188
+ //Spline
189
+ [typeof(Spline)] = LuauContextAll,
190
+ [typeof(BezierCurve)] = LuauContextAll,
191
+ [typeof(CurveUtility)] = LuauContextAll,
192
+ [typeof(SplineUtility)] = LuauContextAll,
193
+ [typeof(BezierKnot)] = LuauContextAll,
187
194
 
188
195
  // Rigging
189
196
  [typeof(TwoBoneIKConstraint)] = LuauContextAll,
@@ -659,10 +659,10 @@ namespace Code.Player.Character.MovementSystems.Character {
659
659
  newVelocity += pendingImpulse;
660
660
  currentMoveSnapshot.airborneFromImpulse = !grounded || pendingImpulse.y > .01f;
661
661
  pendingImpulse = Vector3.zero;
662
- if (isImpulsing) {
663
- // print(" isImpulsing: " + isImpulsing + " impulse force: " + this.pendingImpulse + "New Vel: " +
664
- // newVelocity);
665
- }
662
+ // if (isImpulsing) {
663
+ // print(" isImpulsing: " + isImpulsing + " impulse force: " + pendingImpulse + "New Vel: " +
664
+ // newVelocity);
665
+ // }
666
666
  }
667
667
 
668
668
  #endregion
@@ -1499,6 +1499,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1499
1499
  #region Helpers
1500
1500
 
1501
1501
  private void SnapToY(float newY) {
1502
+ //print("Snapping to Y: " + newY);
1502
1503
  var newPos = rb.position;
1503
1504
  newPos.y = newY;
1504
1505
  rb.position = newPos;
@@ -1577,9 +1578,15 @@ namespace Code.Player.Character.MovementSystems.Character {
1577
1578
  _smoothLookVector = moveDirMode == MoveDirectionMode.Camera;
1578
1579
  }
1579
1580
 
1580
- public void SetLookVector(Vector3 lookVector) {
1581
+ /// <summary>
1582
+ /// Call this from C# to let Luau scripts know we've updated the look vector.
1583
+ /// Example: A teleport RPC.
1584
+ /// </summary>
1585
+ /// <param name="lookVector"></param>
1586
+ [HideFromTS]
1587
+ public void SetLookVectorAndNotifyLuau(Vector3 lookVector) {
1581
1588
  OnNewLookVector?.Invoke(lookVector);
1582
- SetLookVectorRecurring(lookVector);
1589
+ SetLookVector(lookVector);
1583
1590
  }
1584
1591
 
1585
1592
  /// <summary>
@@ -1587,7 +1594,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1587
1594
  /// Useful for something that is updating the lookVector frequently and needs to listen for other scripts modifying the lookVector.
1588
1595
  /// </summary>
1589
1596
  /// <param name="lookVector"></param>
1590
- public void SetLookVectorRecurring(Vector3 lookVector) {
1597
+ public void SetLookVector(Vector3 lookVector) {
1591
1598
  // Don't set look vectors on observed characters
1592
1599
  if (mode == NetworkedStateSystemMode.Observer) {
1593
1600
  return;
@@ -1612,7 +1619,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1612
1619
  }
1613
1620
  }
1614
1621
 
1615
- public void SetLookVectorRecurringToMoveDir() {
1622
+ public void SetLookVectorToMoveDir() {
1616
1623
  // Don't set look vectors on observed characters
1617
1624
  if (mode == NetworkedStateSystemMode.Observer) {
1618
1625
  return;
@@ -1675,7 +1682,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1675
1682
  // TODO: why? Copied from old movement
1676
1683
  currentMoveSnapshot.airborneFromImpulse = true;
1677
1684
  rb.MovePosition(position);
1678
- SetLookVector(lookVector);
1685
+ SetLookVectorAndNotifyLuau(lookVector);
1679
1686
  }
1680
1687
 
1681
1688
  public void SetMovementEnabled(bool isEnabled) {
@@ -1701,7 +1708,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1701
1708
  }
1702
1709
 
1703
1710
  public void AddImpulse(Vector3 impulse) {
1704
- // print("Adding impulse: " + impulse);
1711
+ //print("Adding impulse: " + impulse);
1705
1712
  if (mode == NetworkedStateSystemMode.Observer && isServer) {
1706
1713
  RpcAddImpulse(impulse);
1707
1714
  return;
@@ -1870,7 +1877,7 @@ namespace Code.Player.Character.MovementSystems.Character {
1870
1877
 
1871
1878
  [TargetRpc]
1872
1879
  public void RpcSetLookVector(Vector3 lookVector) {
1873
- SetLookVector(lookVector);
1880
+ SetLookVectorAndNotifyLuau(lookVector);
1874
1881
  }
1875
1882
 
1876
1883
  [TargetRpc]
@@ -47,6 +47,7 @@ using UnityEngine.VFX;
47
47
  using Code.Player.Accessories;
48
48
  using Code.Player.Character.MovementSystems.Character;
49
49
  using Code.Player.Character.NetworkedMovement;
50
+ using UnityEngine.Splines;
50
51
 
51
52
  public class TypeGenerator : MonoBehaviour
52
53
  {
@@ -249,6 +250,14 @@ public class TypeGenerator : MonoBehaviour
249
250
  typeof(Grid),
250
251
  typeof(UIScrollRectEventBubbler),
251
252
  typeof(VisualEffect),
253
+
254
+ // Splines
255
+ typeof(BezierCurve),
256
+ typeof(BezierKnot),
257
+ typeof(CurveUtility),
258
+ typeof(Spline),
259
+ typeof(SplineAnimate),
260
+ typeof(SplineUtility),
252
261
 
253
262
  // Airship
254
263
  typeof(AnimationEventData),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg.easy.airship",
3
- "version": "0.1.2145",
3
+ "version": "0.1.2147",
4
4
  "displayName": "Airship",
5
5
  "unity": "2021.3",
6
6
  "unityRelease": "12f1",
@@ -38,7 +38,8 @@
38
38
  "com.unity.ugui": "3.0.0",
39
39
  "com.unity.visualscripting": "1.9.5",
40
40
  "com.unity.inputsystem": "1.13.0",
41
- "com.unity.visualeffectgraph": "17.0.3"
41
+ "com.unity.visualeffectgraph": "17.0.3",
42
+ "com.unity.splines": "2.8.1"
42
43
  },
43
44
  "type": "library",
44
45
  "description": "Easy Airship"