欢迎光临散文网 会员登陆 & 注册

[Unity中文课堂教程预告片] C#初级编程

2022-09-06 19:06 作者:祭酒少司  | 我要投稿

using System.Collections;

using System.Collections.Generic;

using UnityEngine;


public class baseexercise : MonoBehaviour

{

  int myInt = 5;//设置一个整数=5

  // Start is called before the first frame update

  void Start()//主函数

  {

    // myInt = 55;

    // Debug.Log(myInt);//输出

    MultiplyByTwo(myInt)


  }


  int MultiplyByTwo(int number)//number相当于一个临时变量

  {

    int result;//设置一个叫result的值

    result = number*2;

    return result;//输出结果

  }

  

}

第二集的一些笔记

[Unity中文课堂教程预告片] C#初级编程的评论 (共 条)

分享到微博请遵守国家法律