課程
/Unity 3D
/Unity3D快速入門(mén)
我剛學(xué)unity要做一簡(jiǎn)單的游戲,但是C#一點(diǎn)都不會(huì),應(yīng)該先學(xué)哪里呢?C#有什么快速入門(mén)的方法嗎?
2017-02-28
源自:Unity3D快速入門(mén) 2-2
正在回答
從最基礎(chǔ)的開(kāi)始就行,寫(xiě)腳本不需要太高深的東西
謝謝!會(huì)一點(diǎn)點(diǎn)的學(xué)的
我個(gè)人覺(jué)得先下定決心!一定要學(xué)會(huì)。然后了解C#的基本知識(shí),比如結(jié)構(gòu)、語(yǔ)法等(買(mǎi)書(shū)、網(wǎng)上看都行)。然后了解基本知識(shí)以后嘗試去開(kāi)源的unity小工程里看別人的script,一行一行慢慢看懂,然后試著全刪了按照自己掌握的算法和語(yǔ)法寫(xiě)出來(lái),持之以恒就能進(jìn)步。
比如開(kāi)始先試著能輸出一個(gè)字符串(不是unity里的用法,只是C#編譯),
using System;namespace HelloWorldApplication{????class HelloWorld????{????????static void Main(string[] args)????????{????????????/* ?C# 程序?qū)W習(xí)加油哦 */????????????Console.WriteLine("Hello World!");????????????Console.ReadKey();????????}????}}
試著能自己寫(xiě)出來(lái),而不是背出來(lái),那就能輸出一串字了對(duì)嗎?
然后試試進(jìn)一步難的,比如計(jì)算個(gè)矩形的面積:
using System;namespace RectangleApplication{ ? ?class Rectangle ? ?{ ? ? ? ?// 成員變量 ? ? ? ?double length; ? ? ? ?double width; ? ? ? ?public void Acceptdetails() ? ? ? ?{ ? ? ? ? ? ?length = 4.5; ? ? ? ? ? ? ? ?width = 3.5; ? ? ? ?} ? ? ? ?public double GetArea() ? ? ? ?{ ? ? ? ? ? ?return length * width; ? ? ? ?} ? ? ? ?public void Display() ? ? ? ?{ ? ? ? ? ? ?Console.WriteLine("Length: {0}", length); ? ? ? ? ? ?Console.WriteLine("Width: {0}", width); ? ? ? ? ? ?Console.WriteLine("Area: {0}", GetArea()); ? ? ? ?} ? ?} ? ? ? ?class ExecuteRectangle ? ?{ ? ? ? ?static void Main(string[] args) ? ? ? ?{ ? ? ? ? ? ?Rectangle r = new Rectangle(); ? ? ? ? ? ?r.Acceptdetails(); ? ? ? ? ? ?r.Display(); ? ? ? ? ? ?Console.ReadLine(); ? ? ? ?} ? ?}}
循序漸進(jìn)就好。
其實(shí)我也初學(xué)者,哈哈,與君共勉~
舉報(bào)
本課程為Unity 3D入門(mén)教程,快速學(xué)會(huì)用Unity開(kāi)發(fā)游戲
3 回答想學(xué)unity游戲開(kāi)發(fā),除了unity引擎還需要什么編輯器嗎?比如寫(xiě)c#的??!
1 回答unity
1 回答Unity
2 回答Unity下載
1 回答C語(yǔ)言自學(xué)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-03-29
從最基礎(chǔ)的開(kāi)始就行,寫(xiě)腳本不需要太高深的東西
2017-03-01
謝謝!會(huì)一點(diǎn)點(diǎn)的學(xué)的
2017-03-01
我個(gè)人覺(jué)得先下定決心!一定要學(xué)會(huì)。然后了解C#的基本知識(shí),比如結(jié)構(gòu)、語(yǔ)法等(買(mǎi)書(shū)、網(wǎng)上看都行)。然后了解基本知識(shí)以后嘗試去開(kāi)源的unity小工程里看別人的script,一行一行慢慢看懂,然后試著全刪了按照自己掌握的算法和語(yǔ)法寫(xiě)出來(lái),持之以恒就能進(jìn)步。
比如開(kāi)始先試著能輸出一個(gè)字符串(不是unity里的用法,只是C#編譯),
using System;
namespace HelloWorldApplication
{
????class HelloWorld
????{
????????static void Main(string[] args)
????????{
????????????/* ?C# 程序?qū)W習(xí)加油哦 */
????????????Console.WriteLine("Hello World!");
????????????Console.ReadKey();
????????}
????}
}
試著能自己寫(xiě)出來(lái),而不是背出來(lái),那就能輸出一串字了對(duì)嗎?
然后試試進(jìn)一步難的,比如計(jì)算個(gè)矩形的面積:
using System;namespace RectangleApplication{
? ?class Rectangle
? ?{
? ? ? ?// 成員變量
? ? ? ?double length;
? ? ? ?double width;
? ? ? ?public void Acceptdetails()
? ? ? ?{
? ? ? ? ? ?length = 4.5; ? ?
? ? ? ? ? ?width = 3.5;
? ? ? ?}
? ? ? ?public double GetArea()
? ? ? ?{
? ? ? ? ? ?return length * width;
? ? ? ?}
? ? ? ?public void Display()
? ? ? ?{
? ? ? ? ? ?Console.WriteLine("Length: {0}", length);
? ? ? ? ? ?Console.WriteLine("Width: {0}", width);
? ? ? ? ? ?Console.WriteLine("Area: {0}", GetArea());
? ? ? ?}
? ?}
? ?
? ?class ExecuteRectangle
? ?{
? ? ? ?static void Main(string[] args)
? ? ? ?{
? ? ? ? ? ?Rectangle r = new Rectangle();
? ? ? ? ? ?r.Acceptdetails();
? ? ? ? ? ?r.Display();
? ? ? ? ? ?Console.ReadLine();
? ? ? ?}
? ?}}
循序漸進(jìn)就好。
其實(shí)我也初學(xué)者,哈哈,與君共勉~