public MovePositionState Init(Objects.Galaxy.State.AppearablePositionState controlledState, float speed, float stopDistance, Vector3 targetVector) { this.targetVector = targetVector; this.distance = stopDistance; this.speed = speed; this.controlledState = controlledState; lineRenderer = util.Line.DrawTempLine(controlledState.position, targetVector, Color.green, 3); base._Init(); return(this); }
public override StateAction hydrate <T>(T source) { this.controlledState = source as Objects.Galaxy.State.AppearablePositionState; if (this.controlledState == null) { Debug.LogError("couldnt coerce source to AppearableState" + " " + source); } base._Init(); return(this); }