『壹』 急求!!! QQ空間滑鼠代碼, 一條魚跟著滑鼠游動 的代碼誰有重謝!

樓主,你看下是不是下面這個
http://www.hahalai.com/bbs/viewthread.php?tid=827&extra=

『貳』 遊走的字元程序C源代碼

對與我來說這問題真有點難度,要是用java就好了
C不太清楚

『叄』 在Java游戲中讓一個人物走動的代碼是什麼

代碼主要為以下:

package com.lovo.game.frame;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import javax.swing.JFrame;
import com.lovo.game.role.Fire;
import com.lovo.game.role.GameMap;
import com.lovo.game.role.ZhaoYun;
import com.lovo.game.util.TrackerInit;

public class GameStartFrame extends JFrame implements Runnable{

private Image memoryImage;

private Graphics memoryGraphics;

public static boolean isRun = true;

private static GameMap gameMap = new GameMap();

private ZhaoYun zy = new ZhaoYun();

private Fire fire = new Fire();

public GameStartFrame(){
this.setSize(900,700);
this.setVisible(true);
this.setDefaultCloseOperation(3);
//設置居中
this.setLocationRelativeTo(null);

//初始化雙緩沖畫布、畫筆
this.memoryImage = this.createImage(900,700);
this.memoryGraphics = this.memoryImage.getGraphics();

//媒體追蹤器
MediaTracker tracker = new MediaTracker(this);
TrackerInit.initImage(tracker);

//啟動線程
Thread th = new Thread(this);
th.start();
}

public static void main(String[] args) {
GameStartFrame game = new GameStartFrame();
}
public void run() {
while(isRun){
this.flushFrame();
try {
Thread.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
}

}
private void flushFrame(){
gameMap.drawMap(memoryGraphics);
zy.drawImage(memoryGraphics);
fire.drawImage(memoryGraphics);
//將雙緩沖畫布中的圖片顯示在窗體
this.getGraphics().drawImage(this.memoryImage,0,0,this);
}
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;

public class GameMap {

public static Image mapImg;

public static int mapx;

public void drawMap(Graphics memoryGraphics){
mapx -=5;
if(mapx <=-17100){
mapx = -17100;
}
memoryGraphics.drawImage(mapImg,mapx,0,null);
}

}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;
import com.lovo.game.util.MoveImageChange;

public class Fire {

public static Image[]fireImage;

private int x =100;

private int y =300;

private int width = 200;

private int height = 130;

private MoveImageChange moveChange = new MoveImageChange(3);

public void drawImage(Graphics memoryGraphics){
Image img = moveChange.imageChange(fireImage);
memoryGraphics.drawImage(img,this.x,this.y,this.width,this.height,null);
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;
import java.awt.MediaTracker;
import com.lovo.game.role.Fire;
import com.lovo.game.role.GameMap;
import com.lovo.game.role.ZhaoYun;
public class TrackerInit {

public static void initImage(MediaTracker tracker){
//初始化地圖圖片
GameMap.mapImg = CutImage.getSingleImage("image/map.jpg", tracker);

//趙雲
ZhaoYun.zyImage = CutImage.cutOneImage("image/boss/playSpear.png",18, 236, 134,tracker);
//火
Fire.fireImage = CutImage.cutOneImage("image/fireImg.png", 6, 283, 161,tracker);
try {
//0組的圖片全部等待載入完畢後,在顯示
tracker.waitForID(0);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;

import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.image.CropImageFilter;
import java.awt.image.FilteredImageSource;
import java.awt.image.ImageProcer;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class CutImage {

public static Image[][] cutManyImage(String filePath, int row, int col,
int imageWidth, int imageHight,MediaTracker tracker) {

Image[][] img = new Image[row][col];
ImageIcon imIcon = new ImageIcon(filePath);// 創建圖像數組對象
Image imgTemp = imIcon.getImage();// 創建源圖像
// 為源 圖象獲取ImageProcer源
ImageProcer sourceProcer = imgTemp.getSource();
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
// 創建圖片分割圖像對象,第一、二個參數為分割圖像起始坐標。後兩個參數為圖像大小
CropImageFilter cropImg = new CropImageFilter(j * imageWidth, i * imageHight,imageWidth, imageHight);

ImageProcer imgProcer = new FilteredImageSource(sourceProcer, cropImg);

img[i][j] = new JFrame().createImage(imgProcer);
tracker.addImage(img[i][j], 0);
}
}
return img;
}

public static Image[] cutOneImage(String filePath,int col,
int imageWidth, int imageHight,MediaTracker tracker) {

Image[] img = new Image[col];
ImageIcon imIcon = new ImageIcon(filePath);// 創建圖像數組對象
Image imgTemp = imIcon.getImage();// 創建源圖像
// 為源 圖象獲取ImageProcer源
ImageProcer sourceProcer = imgTemp.getSource();

for (int j = 0; j < col; j++) {
// 創建圖片分割圖像對象,第一、二個參數為分割圖像起始坐標。後兩個參數為圖像大小
CropImageFilter cropImg = new CropImageFilter(j * imageWidth, 0,imageWidth, imageHight);

ImageProcer imgProcer = new FilteredImageSource(sourceProcer, cropImg);

img[j] = new JFrame().createImage(imgProcer);
tracker.addImage(img[j], 0);
}

return img;
}

public static Image getSingleImage(String imgPath,MediaTracker tracker){
Image img = new ImageIcon(imgPath).getImage();
tracker.addImage(img, 0);
return img;
}
}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.util;
import java.awt.Image;

public class MoveImageChange {

private int count;

private Image img;

private int frequency;

private int loopCount;

public MoveImageChange(int frequency){
this.frequency=frequency;
}

public MoveImageChange(int frequency,int count){
this.frequency=frequency;
this.count = count;
}

public Image imageChange(Image[] images){
if(img==null){//初始圖片為第一張圖片
img=images[0];
}
count++;
if(count>frequency){//當記數器大於頻率時
count=0;
loopCount++;

if(loopCount >= images.length){//圖片下標越界時
loopCount=0;
}
img=images[loopCount];
}

return img;
}

public void setLoopCount(int loopCount){
this.loopCount = loopCount;
}
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package com.lovo.game.role;
import java.awt.Graphics;
import java.awt.Image;
import com.lovo.game.util.MoveImageChange;

public class ZhaoYun {

public static Image[] zyImage;

private int x =600;

private int y =300;

private int width =200;

private int height =130;

private MoveImageChange moveChange = new MoveImageChange(3);

public void drawImage(Graphics memoryGraphics){
Image img = moveChange.imageChange(zyImage);
memoryGraphics.drawImage(img,this.x,this.y,this.width,this.height,null);

『肆』 新人求一個在水中游動的魚的效果的flash源代碼

這樣說吧。你要做這個效果分為2步、第一步實現魚的游動。第二步利用點陣圖數據做水波。關於這個水波效果。網上可以搜到。至於魚的游動。無非是角度和位移。主要是看你魚的AI怎麼設定。

『伍』 求一個跟隨滑鼠游動的魚的FLASH代碼 請高手進

元件1頭,連接名為:yt

元件2身,連接名:ys

元件3尾巴,連接名:yz

主場景第1幀代碼:

this.attachMovie("yt","xy0",21);
for (i=1;i<21;i++){
if(i == 13){
this.attachMovie("yz","xy"+i,i);
} else {
this.attachMovie("ys","xy"+i,i);
}
cys = eval("xy"+i);
cys._yscale -= i*5;
cys._xscale -= i*5;
}

第2幀代碼:

ytx = _xmouse - xy0._x;
yty = _ymouse - xy0._y;
ytz = Math.atan2(yty,ytx)*180/Math.PI;
xy0._rotation = ytz;
xy0._x += ytx/10;
xy0._y += yty/10;
n=21;
while(n>0){
hys = eval("xy"+n);
qys = eval("xy"+(n-1));
ysx = qys._x - hys._x;
ysy = qys._y - hys._y;
ysz = Math.atan2(ysy,ysx)*180/Math.PI;
hys._rotation = ysz;
hys._x = qys._x;
hys._y = qys._y;
n--;
}

第3幀代碼:

gotoAndPlay(2);

『陸』 網路游戲那些動作的代碼在哪個文件夾

動作的代碼在哪個文件夾不清楚
我在玩的動作游戲是怪物獵人OL
不管是刷怪還是休閑
都分別設計有貼合場景的背景音樂
怪物真實 更是提升了刀刀入肉的極致快感
還可以探尋新的怪物
真的抓住玩家這樣的一個好奇心
想的十分周到
可玩性更高

『柒』 這是魚游動的動畫代碼,請高手 解釋下 並幫我改個400*200的魚游動的范圍 謝謝1

只要這幾句改一下就可以了

bug._x = random(400) - 200;
bug._y = random(200) - 100;
top = -200;
bottom = 200;
left = -100;
right = 100;

『捌』 游動字幕代碼怎麼弄

上下滾動: <style> .marquee{ width:120px; height:200px; background-color:orange; } .tx{ top: 100px; } </style> <script> var func; var oTop = 180; function marquee(){ var tx = document.getElementById("tx"); tx.style.paddingTop = oTop; oTop -= 3; if(oTop <= 0){ oTop = 180; } } window.onload = function(){ out(); } function over(){ clearInterval(func); } function out(){ func = setInterval("marquee();", 80); } </script> </head> <body> <div class="marquee" id="marquee" onmouseover="over()" onmouseout="out()"> <div class="tx" id="tx" >滾動字幕的內容</div> </div> 左右滾動: <script language="JavaScript1.2"> /* */ //字幕寬度 var marqueewidth=330 //字幕高度(只對NC有效) var marqueeheight=10 //字幕速度(數值越大越快) var speed=10 //歡迎光臨 var marqueecontents='字幕滾動的內容' if (document.all) document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>') function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ setTimeout("window.onresize=regenerate",450) intializemarquee() } } function intializemarquee(){ document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>') document.cmarquee01.document.cmarquee02.document.close() thelength=document.cmarquee01.document.cmarquee02.document.width scrollit() } function scrollit(){ if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){ document.cmarquee01.document.cmarquee02.left-=speed setTimeout("scrollit()",100) } else{ document.cmarquee01.document.cmarquee02.left=marqueewidth scrollit() } } window.onload=regenerate2 </script>
求點贊

『玖』 CF游戲里的的動作代碼,

B--1(2)(3)(4)換包
Z
.X.
C.--發無線電(只有隊友可以看見)
ctrl--蹲
W-前進
A-左走
S-後退
D-右走
1
主武器
2
副武器
就是手槍
3
近身武器
4-投擲武器
R-換子彈
G
仍槍
Q
切換剛才使用的武器
左鍵射擊
右鍵
使用瞄準器(使用於有瞄準器的)
回車
發言
ESC-菜單
F11-同意
F12-反對
TAB-看人數和殺的人數
F2-全部人可見說話
F3團隊發言
F4
戰隊發言
純手打
望點贊
謝謝

『拾』 C語言程序設計游動的魚

不會是ASCII碼,應該是C圖形應用吧,我們沒學那~~~~~~~