ZKX's LAB

unity2d拾起武器 有没有什么优秀的unity 2d教程推荐的?

2021-04-07知识6

[Unity 2D]请教一个发射子弹的问题? 在做一个横版射击游戏,角色就左右两个方向攻击(非鼠标),然后发现在Update函数里面子弹只能往一个方向…

Unity的2D游戏制作中,做了个发射子弹的功能,创建的新的子弹的GameObject可以实现功能,但是无法显示 你创建的子弹是在Hierarchy面板中就没有,还是在Hierarchy有你创建的子弹,而scene视图中看不到,你的这些代码是没有问题的,只要你的ammo[0]是有值的,还有你的mouse_pos。

UNITY 2D C# 解释下这两段的意思?官方打外星人脚本 public class PlayerControl:MonoBehaviour{[HideInInspector]public bool facingRight4=true;For determining which way the player is currently facing.为了确定主角的当前状态(左右)[HideInInspector]public bool jump=false;Condition for whether the player should jump.条件决定是否跳。public float moveForce3=365f;Amount of force added to move the player left and right.多少力量能使角色向左或向右public float maxSpeed2=5f;The fastest the player can travel in the x axis.使角色快速地在X轴上移动。public AudioClip[]jumpClips;音频数组。已经输入三个跳的音频。Array of clips for when the player jumps.public float jumpForce=1000f;当跳起的时候增加的力量 Amount of force added when the player jumps.public AudioClip[]taunts;角色 taunts 时的音频,8个音频。Array of clips for when the player taunts.public float tauntProbability=50f;taunt发生的条件。Chance of a taunt happening.public float tauntDelay=1f;当taunt发生时延迟的时间。Delay for when the taunt should happen.private int tauntIndex;taunt数组。

#unity2d拾起武器#unity2d武器

随机阅读

qrcode
访问手机版