Exemplo n.º 1
0
 public AnimationPosition(AnimationPosition source) : base(source)
 {
     fromPos      = source.fromPos;
     toPos        = source.toPos;
     lerpType     = source.lerpType;
     posType      = source.posType;
     isFromTarget = source.isFromTarget;
 }
Exemplo n.º 2
0
    public void Animate(string animationName, AnimationPosition positionName)
    {
        Vector3    position  = (positionName == AnimationPosition.TopRight) ? new Vector3(0.4f, 0.6f, 0) : new Vector3(-0.4f, 0.6f, 0);
        GameObject animation = Instantiate(Resources.Load <GameObject>(animationName));

        if (animation == null)
        {
            Debug.LogError("Could not find " + animationName + " prefab in Resources folder!");
        }
        else
        {
            animation.transform.parent   = transform;
            animation.transform.position = transform.position + position;
        }
    }
Exemplo n.º 3
0
 protected override void Load()
 {
     uiAnimation = new AnimationPosition(aniTarget, aniLength, aniCurve, fromPos, toPos, lerpType, posType, isFromTarget);
 }