Code cleanup.

This commit is contained in:
2023-02-09 18:18:34 +08:00
parent 7714c277fd
commit 18ff4b8e16
6 changed files with 13 additions and 41 deletions

View File

@@ -155,8 +155,8 @@ namespace Cryville.Crtr.Event {
#if UNITY_5_6_OR_NEWER
tev.Target.Transform.SetPositionAndRotation(Position, Rotation);
#else
tev.Target.Transform.position = GetCurrentWorldPoint();
tev.Target.Transform.rotation = Quaternion.Euler(s.Direction);
tev.Target.Transform.position = Position;
tev.Target.Transform.rotation = Rotation;
#endif
skinContainer.MatchDynamic(s);
CloseAnchor();

View File

@@ -70,7 +70,6 @@ namespace Cryville.Crtr.Event {
public byte CloneType;
public ContainerState rootPrototype = null;
private ContainerState prototype = null;
public ContainerHandler Handler {
get;
@@ -140,7 +139,6 @@ namespace Cryville.Crtr.Event {
else if (ct == 3) Handler.ns = r;
else if (ct >= 16) Handler.ps = r;
else throw new InvalidOperationException("Invalid clone type");
r.prototype = this;
r.CloneType = ct;
return r;
}

View File

@@ -3,7 +3,6 @@ using System.Collections.Generic;
namespace Cryville.Crtr.Event {
public class EventBus : StateBase<EventBatch>, IDisposable {
EventBus prototype = null;
public ContainerState RootState {
get;
private set;
@@ -25,7 +24,6 @@ namespace Cryville.Crtr.Event {
public EventBus Clone(byte ct, float offsetTime = 0) {
var r = (EventBus)MemberwiseClone();
r.prototype = this;
r.states = new Dictionary<EventContainer, ContainerState>();
r.activeStates = new HashSet<ContainerState>();
r.invalidatedStates = new HashSet<ContainerState>();