コード例 #1
0
    /// <summary>
    /// 绝对缩放
    /// </summary>
    /// <param name="target">目标对象</param>
    /// <param name="x">目标方向缩放:x</param>
    /// <param name="y">目标方向缩放:y</param>
    /// <param name="time">变换时长</param>
    /// <returns></returns>
    public static ScaleTransformer scaleTo(GameObject target, float x, float y, float time)
    {
        ScaleTransformer transformer = new ScaleTransformer();

        transformer.m_nStartType     = 0;
        transformer.m_fTargetX       = x;
        transformer.m_fTargetY       = y;
        transformer.m_fTransformTime = time;
        transformer.target           = target;
        return(transformer);
    }
コード例 #2
0
    /// <summary>
    /// 相对缩放
    /// </summary>
    /// <param name="target">目标对象</param>
    /// <param name="speedX">x方向缩放速度</param>
    /// <param name="speedY">y方向缩放速度</param>
    /// <param name="time">变换时长</param>
    /// <returns></returns>
    public static ScaleTransformer scaleBy(GameObject target, float speedX, float speedY, float time)
    {
        ScaleTransformer transformer = new ScaleTransformer();

        transformer.m_nStartType     = 1;
        transformer.m_fSpeedX        = speedX;
        transformer.m_fSpeedY        = speedY;
        transformer.m_fTransformTime = time;
        transformer.target           = target;
        return(transformer);
    }
コード例 #3
0
 public ScaleAnimation()
     : base(Resource.String.anim_scale)
 {
     Transformer = new ScaleTransformer();
 }