This can be seen as the initial state of the project after the released demo.
The changes include:
- New ship models
- Singleton manager structure to keep project scaleable in the future
- Managing players, their settings, character choices, statistics, match setups, controls etc. in a separate decoupled scene
- Main menu with transitions to the arena scene
- Beginnings of a custom audio solution
- Logging with Log4Net
It is really a complete overhaul of the projects structure and management.
29 lines
898 B
C#
29 lines
898 B
C#
#if PRIME_TWEEN_INSTALLED
|
|
using PrimeTween;
|
|
using UnityEngine;
|
|
|
|
namespace PrimeTweenDemo {
|
|
public class Door : Animatable {
|
|
[SerializeField] CameraController cameraController;
|
|
[SerializeField] Transform animationAnchor;
|
|
bool isClosed;
|
|
|
|
public override void OnClick() {
|
|
Animate(!isClosed);
|
|
}
|
|
|
|
public override Sequence Animate(bool _isClosed) {
|
|
if (isClosed == _isClosed) {
|
|
return Sequence.Create();
|
|
}
|
|
isClosed = _isClosed;
|
|
var rotationTween = Tween.LocalRotation(animationAnchor, _isClosed ? new Vector3(0, -90) : Vector3.zero, 0.7f, Ease.InOutElastic);
|
|
var sequence = Sequence.Create(rotationTween);
|
|
if (_isClosed) {
|
|
sequence.Group(cameraController.Shake(0.5f));
|
|
}
|
|
return sequence;
|
|
}
|
|
}
|
|
}
|
|
#endif |