我们可以在SFML 2.1 / C ++数组或精灵的多维数组? [英] Can we make arrays or multidimensional arrays of sprites in SFML 2.1/C++?

查看:81
本文介绍了我们可以在SFML 2.1 / C ++数组或精灵的多维数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单。我们可以在SFML精灵或图像组成的数组。例如:

My question is very simple. Can we make an array of sprites or images in SFML. For example:

int myArray[] = {1, 2, 3};

考虑索引号的一个,两个和三个三种不同的图像。结果
我们该怎么办呢?任何人都可以用一些code例子解释一下吗?

Consider index number one, two and three are three different images.
How can we do it? Can anyone explain with some code example?

推荐答案

当然可以!

sf::Sprite array[10] = { ... }

这篇关于我们可以在SFML 2.1 / C ++数组或精灵的多维数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆