Example #1
0
    /// <summary>
    /// 232 移动图片
    /// 编号
    /// 时间
    /// x
    /// y
    /// opacity
    /// rotation
    /// zoomX
    /// zoomY
    /// </summary>
    /// <returns></returns>
    public bool command_transPic()
    {
        int         num     = int.Parse(this.currentParam[0]);
        int         wait    = int.Parse(this.currentParam[1]);
        int         x       = int.Parse(this.currentParam[2]);
        int         y       = int.Parse(this.currentParam[3]);
        GamePicture currPic = GameTemp.gameScreen.getPicture(num);

        Debug.Log(string.Format("trans pic {0}", num));
        if (currPic == null)
        {
            Debug.Log(string.Format("return for pic is null"));
            return(true);
        }
        currPic.setAnimDuration(wait);
        currPic.moveTo(x, y);
        if (this.currentParam.Length > 4 && !"".Equals(this.currentParam[4]))
        {
            int opacity = int.Parse(this.currentParam[4]);
            currPic.fadeTo(opacity);
        }
        if (this.currentParam.Length > 5 && !"".Equals(this.currentParam[5]))
        {
            int rotation = int.Parse(this.currentParam[5]);
            currPic.rotateTo(rotation);
        }
        if (this.currentParam.Length > 7)
        {
            float zoomX = float.Parse(this.currentParam[6]);
            float zoomY = float.Parse(this.currentParam[7]);
            currPic.zoomTo(zoomX, zoomY);
        }
        return(true);
    }