Unity面试总结-功能实现

这篇博客总结了Unity面试中常见的问题,包括从接到任务到完成任务的流程,设计背包系统的伪代码,背包的实现细节,如何在UI上显示模型,Lua与C#的交互方式,UI优化注意事项,以及伤害飘字的实现方法。涉及到关键技术和设计模式,如MVC,RenderTexture和交互原理。
摘要由CSDN通过智能技术生成

1.从接到任务到完成任务,一共几个过程,每个过程注意什么?

  • 需求分析:确保理解和策划想法一致。
  • 搭建ui或场景:
  • 编写代码:
  • 测试功能:
  • 解决bug:

2.设计一个背包系统,格子500. 伪代码实现 增,删,改,查。struct sitem{ string uid,int index, int count, int itemcode }

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PaiXu
{
    struct sitem {
       public string uid;     //唯一id
       public int index;      //位置
       public int itemCoad;   //物品id
       public int itemAmount; //物品数量
    }

    class Class2
    {
        public int bagCount = 500;

        //申请一个背包列表
        public List<sitem> bagList = new List<sitem>();


        //初始化单个背包格
        public void InitSimpBagItem(int index)
        {
            bagList[index] = new sitem();
        }
        //初始化整个背包
        public void Init
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值