public void Disappear() { _time = 0f; _current = _outCurve; transform.position = _posIn; _from = _posIn; _to = _posOut; }
public void Init() { if (xzLine == null) { xzLine = EvaluationCurveManager.instance.GetCurve(_xzLineName); yLine = EvaluationCurveManager.instance.GetCurve(_zLineName); xzCurve = EvaluationCurveManager.instance.GetCurve(_xzCurveName); yCurve = EvaluationCurveManager.instance.GetCurve(_yCurveName); } }
public void Appear() { _globalCanvas.enabled = true; _time = 0f; _current = _inCurve; transform.position = _posOut; _from = _posOut; _to = _posIn; }
public void Init(EvaluationCurve inCurve, EvaluationCurve outCurve) { _posIn = transform.position; transform.position += new Vector3(Screen.width, 0f, 0f); _posOut = _posIn + new Vector3(Screen.width, 0f, 0f); _inCurve = inCurve; _outCurve = outCurve; _isInit = true; }
void Init() { //_posIn = transform.position; //transform.position += new Vector3(Screen.width, 0f, 0f); //_posOut = _posIn + new Vector3(Screen.width, 0f, 0f); _inCurve = EvaluationCurveManager.instance.GetCurve(_inCurveName); _outCurve = EvaluationCurveManager.instance.GetCurve(_outCurveName); _fishWindow.Init(_inCurve, _outCurve); _crewWindow.Init(_inCurve, _outCurve); _isInit = true; }
public void Init(Vector2 velocity, float angular, EvaluationCurve velocityCurve, EvaluationCurve angularCurve, GameObject origin = null) { _velocity = velocity; _angular = angular; _velocityCurve = velocityCurve; _angularCurve = angularCurve; _origin = origin; _time = 0; }
Vector3 ComputeControlPoint(EvaluationCurve xyCurve, EvaluationCurve yCurve, float time, Vector3 from, Vector3 to) { Vector2 from2D = WorldConversion.ToVector2(from); Vector2 to2D = WorldConversion.ToVector2(to); float distance01 = xyCurve.Evaluate(time); Vector2 pos2D = (to2D - from2D) * distance01 + from2D; float y01 = yCurve.Evaluate(time); float y = (to.y - from.y) * y01 + from.y; return(new Vector3(pos2D.x, y, pos2D.y)); }