有没有人知道如何使视图反转,我有一个水平ProgressBar我希望它从右到左而不是从左到右
目前我遇到的问题是,当我在本地运行(在ubuntuVM中),使用WebStorm作为网络服务器时,我运行我的游戏并且它运行良好且响应迅速,但当我将其上传到我的虚拟主机和游戏时从那里它是滞后的,点击事件没有响应.
我认为这是因为我错误地使用了Ticker(你如何调用阶段的更新?):
canvas = document.getElementById('myCanvas');
canvas = new createjs.Stage(canvas);
createjs.Ticker.addEventListener("tick", canvas);
Run Code Online (Sandbox Code Playgroud)
所有容器,精灵等都是这个阶段的孩子
http://thegamingproject.org/webgames/ludumdare28/ < - lagginess
我正在创建一个函数,将一个单词列表转换为一个数组供其他函数使用,但不知怎的,我正在覆盖以前的单词.我检查内存地址'并且它们看起来不同,但是当我重新检查一次我完成导入单词后,它们都是一样的.
static char **array;
//takes the name of a data file and reads it into an array
static void InitDictionary(char *fileName){
//slide 36, chap 3
FILE *file;
int count,i;
char dummy[30];
file = fopen(fileName, "r");
while( fscanf(file, "%s", dummy) == 1 ){//counting at first
count++;
}
fclose(file);
array = (char**) malloc(count * sizeof(char*) );
count = 0;
file = fopen(fileName, "r");
while( fscanf(file, "%s", dummy) == 1 ){//now putting values in array
char newEntry[30];
strcpy(newEntry,dummy);
array[count] = newEntry;
printf("%d - …Run Code Online (Sandbox Code Playgroud)