Exemple #1
0
 public TweenScaleStrategy(Transform target, ITweenSharedState sharedSharedState, IValueModifier <Vector2> modHandler, ITweenPlayStyleStrategy style)
 {
     _target      = target;
     _mod         = modHandler;
     _style       = style;
     _sharedState = (TweenSharedState <Vector2>)sharedSharedState;
     _state       = TweenComponentState.None;
     _remote      = new TweenRemoteControl();
     _style.InitializeState();
     SubscribeToRemote();
 }
Exemple #2
0
 public TweenAlphaStrategy(Graphic target, ITweenSharedState sharedState, IValueModifier <float> modHandler, ITweenPlayStyleStrategy style)
 {
     _target      = target;
     _mod         = modHandler;
     _style       = style;
     _sharedState = (TweenSharedState <float>)sharedState;
     _state       = TweenComponentState.None;
     _remote      = new TweenRemoteControl();
     _style.InitializeState();
     SubscribeToRemote();
 }
Exemple #3
0
 public void UpdateComponent(float deltaTime)
 {
     if (CanComplete())
     {
         _sharedState.CycleCount++;
         if (_style.CanComplete())
         {
             TweenCompleted();
             return;
         }
         _style.InitializeState();
         _mod.Reset();
     }
     _target.localScale = _mod.ModifyValue(deltaTime);
     _state             = TweenComponentState.Processing;
 }
Exemple #4
0
 private void TweenCompleted()
 {
     _state = TweenComponentState.Completed;
     _remote.Complete();
     Dispose();
 }
Exemple #5
0
 private void Kill()
 {
     _state = TweenComponentState.Killed;
     Dispose();
 }