Link:INB Home|INB English| INB русский язык|INB العربية|INB Türkiye|INB فارسی|INB Español|INB Français|INB Português|INB 國語|INB 中文|INB 日本语|INB 한국어|INB tiếng Việt Araba Park Etme Oyunu Yapalım (Bölüm 1)
INB forum
[Açık kayıt doğrulamak gerek yok!]Hoşgeldiniz! inbforum.COM Internet No Boundaries Forum, Burada dünyanın tartışmalar etrafında arkadaşlarınızla tartışabilirsiniz gelin ve bize katılın! Daimi ismi: tr-inbforum.forumotion.com
INB forum
[Açık kayıt doğrulamak gerek yok!]Hoşgeldiniz! inbforum.COM Internet No Boundaries Forum, Burada dünyanın tartışmalar etrafında arkadaşlarınızla tartışabilirsiniz gelin ve bize katılın! Daimi ismi: tr-inbforum.forumotion.com
INB forum

Hoşgeldiniz! inbforum.COM Internet No Boundaries Forum, Burada dünyanın tartışmalar etrafında arkadaşlarınızla tartışabilirsiniz gelin ve bize katılın! Daimi ismi: tr-inbforum.forumotion.com


You are not connected. Please login or register

《《《《《《《上一页INBforum   Go down

上一页INBforum》》》》》》》View previous topic View next topic Go down  Message [Page 1 of 1]

1Araba Park Etme Oyunu Yapalım (Bölüm 1) Empty Araba Park Etme Oyunu Yapalım (Bölüm 1) Fri Nov 05, 2010 11:20 pm


Merhaba bu derste küçük bir park oyunu yapacağız.

İlk önce bir sayfa açalım boyutları fark etmez.

[You must be registered and logged in to see this image.]

Araba resmimizi sayfaya koyalım.

[You must be registered and logged in to see this image.]

Resmi F8 ile Movie Clip'e çevirelim.

[You must be registered and logged in to see this image.]

Arabanın Instance Name kısmına Car yazalım... Bu sonraki derslerde işe yarayacak.

Sonra Arabaya tıklayıp F9'a basarak şunları yazalım;

onClipEvent (load)
{
speed = 0;
}
onClipEvent (enterFrame)
{
if (Key.isDown(38 ))
{
speed = speed - 7.500000E-001;
}


if (Key.isDown(40))
{
speed = speed + 5.000000E-001;
}
if (Math.abs(speed) > 20)
{
speed = speed * 7.000000E-001;
}
if (Key.isDown(37))
{
setProperty("", _rotation, _rotation - 7);
}
if (Key.isDown(39))
{
setProperty("", _rotation, _rotation + 7);
}
speed = speed * 9.000000E-001;
x = Math.sin(_rotation * 1.745329E-002) * speed;
y = Math.cos(_rotation * 1.745329E-002) * speed * -1;
if (!_root.land.hitTest(_x + x, _y + y, true))
{
setProperty("", _x, _x + x);
setProperty("", _y, _y + y);
}
else
{
speed = speed * -8.000000E-001;
}
}


Araba yön tuşlarıyla hereket edecek..

Eğer ters yönde giderse;

onClipEvent (load)
{
speed = 0;
}
onClipEvent (enterFrame)
{
if (Key.isDown(40))
{
speed = speed - 7.500000E-001;
}


if (Key.isDown(38 ))
{
speed = speed + 5.000000E-001;
}
if (Math.abs(speed) > 20)
{
speed = speed * 7.000000E-001;
}
if (Key.isDown(37))
{
setProperty("", _rotation, _rotation - 7);
}
if (Key.isDown(39))
{
setProperty("", _rotation, _rotation + 7);
}
speed = speed * 9.000000E-001;
x = Math.sin(_rotation * 1.745329E-002) * speed;
y = Math.cos(_rotation * 1.745329E-002) * speed * -1;
if (!_root.land.hitTest(_x + x, _y + y, true))
{
setProperty("", _x, _x + x);
setProperty("", _y, _y + y);
}
else
{
speed = speed * -8.000000E-001;
}
}



Yazalım....

Arkaplan tasarımı ve diğer aksesuarlar 2.derste anlatılacak..

Kaynak dosyayı indirmek için tıklayın
]

上一页INBforum   Go down

上一页INBforumView previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

Copyright ©2009-2010 LTD Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

IT:SINGLESERVGoogle谷歌翻译TranslateFORUMSOFTLAYERGoogle谷歌广告联盟AdSenseAsia

 

Make a forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com