Inheritance: AbstractVector3TweenProperty
    public GoTweenConfig localRotation(Vector3 endValue, bool isRelative = false)
    {
        RotationTweenProperty item = new RotationTweenProperty(endValue, isRelative, useLocalRotation: true);

        _tweenProperties.Add(item);
        return(this);
    }
Example #2
0
    /// <summary>
    /// localRotation tween
    /// </summary>
    public GoTweenConfig localRotation(Vector3 endValue, bool isRelative = false)
    {
        var prop = new RotationTweenProperty(endValue, isRelative, true);

        _tweenProperties.Add(prop);

        return(this);
    }
    public void SpinElevator()
    {
        RotationTweenProperty rotationProperty = new RotationTweenProperty (new Vector3 (0, -180, 0), true, true);

        GoTweenConfig rotConfig = new GoTweenConfig ().addTweenProperty (rotationProperty);

        rotConfig.setEaseType(GoEaseType.QuadInOut);

        //Go.to( player.transform, rideTime, rotConfig);
        Go.to( transform.parent.gameObject.transform, spinTime, rotConfig);
    }
Example #4
0
    public void SpinElevator()
    {
        RotationTweenProperty rotationProperty = new RotationTweenProperty(new Vector3(0, -180, 0), true, true);

        GoTweenConfig rotConfig = new GoTweenConfig().addTweenProperty(rotationProperty);

        rotConfig.setEaseType(GoEaseType.QuadInOut);

        //Go.to( player.transform, rideTime, rotConfig);
        Go.to(transform.parent.gameObject.transform, spinTime, rotConfig);
    }
Example #5
0
    public override void DoClickToAct()
    {
        RotationTweenProperty rotationProperty = new RotationTweenProperty (new Vector3 (0, -90, 0), true, true);

        GoTweenConfig config = new GoTweenConfig();
        config.addTweenProperty( rotationProperty );

        var tween = new GoTween( transform, openingTime, config, OnOpenComplete );
        Go.addTween (tween);

        GetComponent<AudioSource>().PlayOneShot (doorOpenSound, doorOpenSoundVolume);
    }
Example #6
0
    public override void DoClickToAct()
    {
        RotationTweenProperty rotationProperty = new RotationTweenProperty(new Vector3(0, -90, 0), true, true);

        GoTweenConfig config = new GoTweenConfig();

        config.addTweenProperty(rotationProperty);

        var tween = new GoTween(transform, openingTime, config, OnOpenComplete);

        Go.addTween(tween);

        GetComponent <AudioSource>().PlayOneShot(doorOpenSound, doorOpenSoundVolume);
    }
    public override bool Equals(object obj)
    {
        if (base.Equals(obj))
        {
            return(_useLocalEulers == ((EulerAnglesTweenProperty)obj)._useLocalEulers);
        }
        RotationTweenProperty rotationTweenProperty = obj as RotationTweenProperty;

        if (rotationTweenProperty != null)
        {
            return(_useLocalEulers == rotationTweenProperty.useLocalRotation);
        }
        return(false);
    }
    void SetupShowMainTableTweens()
    {
        Go.defaultEaseType = GoEaseType.AnimationCurve;
        var overworldCameraPositionProperty = new PositionTweenProperty(overworldCameraTweenEndPosition, false, true);
        var overworldCameraTweenConfig      = new GoTweenConfig();

        overworldCameraTweenConfig.addTweenProperty(overworldCameraPositionProperty);
        overworldCameraTweenConfig.startPaused();
        overworldCameraTweenConfig.easeCurve         = showMainTableTweenCurve;
        overworldCameraTweenConfig.onCompleteHandler = OnOverworldCameraTweenComplete;
        overworldCameraTween = new GoTween(overworldCameraTransform, showMainTableTweenTime, overworldCameraTweenConfig);
        overworldCameraTween.autoRemoveOnComplete = false;
        Go.addTween(overworldCameraTween);
        var directionalLightRotationProperty = new RotationTweenProperty(directionalLightTweenEndRotation);
        var directionalLightTweenConfig      = new GoTweenConfig();

        directionalLightTweenConfig.addTweenProperty(directionalLightRotationProperty);
        directionalLightTweenConfig.startPaused();
        directionalLightTweenConfig.easeCurve = setSunTweenCurve;
        directionalLightTween = new GoTween(directionalLightTransform, setSunTweenTime, directionalLightTweenConfig);
        directionalLightTween.autoRemoveOnComplete = false;
        Go.addTween(directionalLightTween);
    }
Example #9
0
    /// <summary>
    /// rotation tween
    /// </summary>
    public TweenConfig rotation( Vector3 endValue, bool isRelative = false )
    {
        var prop = new RotationTweenProperty( endValue, isRelative );
        _tweenProperties.Add( prop );

        return this;
    }