- 博客(13)
- 收藏
- 关注
原创 小白报错2(命名空间不能直接包含字段...)
明明和教程里的一模一样啊…一直显示这里是报错。我小白摸不着头脑,在自己印象中,命名空间是个很大的范围,而且我写的这段应该是属于“方法”。然后花一个下午时间自己查…终于查到问题,原来是打多了一个" } ",我吐了,又是低级错误。直接导致“方法”写到外面去了…就像Q:C#命名空间不能直接包含字段或方法之类的成员[c#]命名空间不能直接包括字段或方法...
2020-05-24 17:55:57 1748 3
原创 SoundMananger(音频管理)
using System.Collections;using System.Collections.Generic;using UnityEngine;public class SoundMananger : MonoBehaviour{ public static SoundMananger instance; //静态类代码 public AudioSou...
2020-04-19 14:35:47 155
原创 PlayerContronller(玩家控制)
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.UI;using UnityEngine.SceneManagement;//用于场景重置(第21节视频)public class PlayerContronller : MonoBehaviou...
2020-04-19 14:33:45 408
原创 Parallax(视觉差效果)
using System.Collections;using System.Collections.Generic;using UnityEngine;public class Parallax : MonoBehaviour{ public Transform Cam; public float moveRate; private float startPo...
2020-04-19 14:33:01 705
原创 Main(主菜单)
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement;//场景管理using UnityEngine.Audio;//音频public class Main : MonoBehaviour{ public Game...
2020-04-19 14:31:54 766
原创 EnterHouse
using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.SceneManagement;public class EnterHouse : MonoBehaviour{// Update is called once per framevoid Upda...
2020-04-19 14:31:11 127
原创 EnterDiolog
using System.Collections;using System.Collections.Generic;using UnityEngine;public class EnterDiolog : MonoBehaviour{ public GameObject eD; //public Animator anim; private void OnTrig...
2020-04-19 14:30:38 110
原创 enemy_flog
using System.Collections;using System.Collections.Generic;using UnityEngine;public class enemy_flog : Enemy{ private Rigidbody2D rb; // private Animator anim; private Collider2D Co...
2020-04-19 14:30:04 196
原创 enemy_eagle
using System.Collections;using System.Collections.Generic;using UnityEngine;public class enemy_eagle : Enemy{ private Rigidbody2D rb; private LayerMask Ground;// private Animator anim...
2020-04-19 14:28:45 143
原创 Enemy
using System.Collections;using System.Collections.Generic;using UnityEngine;//没有void Update(),因为这个只是主类。public class Enemy : MonoBehaviour{ protected Animator anim; protected AudioSource...
2020-04-19 14:28:02 212
原创 Cherry
using System.Collections;using System.Collections.Generic;using UnityEngine;public class Cherry : MonoBehaviour{ public void Death() { FindObjectOfType<PlayerContronller>()....
2020-04-19 14:27:00 147
原创 CameraContronl
using System.Collections;using System.Collections.Generic;using UnityEngine;public class CameraContronl : MonoBehaviour{ public Transform player; void Update() //希望每一帧都能跟随游戏角色 ...
2020-04-19 14:21:27 148
原创 小白报错1
warning CS0665: Assignment in conditional expression is always constant; did you mean to use == instead of = ?Assets\Script\xxxxx.cs(22,13): warning CS0665: Assignment in conditional expression is al...
2020-04-14 15:49:47 856
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人