当前位置: 首页 > news >正文

网站开发的一般流程是什么镇江网站建设制作

网站开发的一般流程是什么,镇江网站建设制作,查企业免费查询,企业如何做好网络推广Alex教程每一P的教程原代码加上我自己的理解初步理解写的注释#xff0c;可供学习Alex教程的人参考 此代码仅为较上一P有所改变的代码 【Unity教程】从0编程制作类银河恶魔城游戏_哔哩哔哩_bilibili Blackhole_Skill_Controller.cs using System.Collections; using System.C…Alex教程每一P的教程原代码加上我自己的理解初步理解写的注释可供学习Alex教程的人参考 此代码仅为较上一P有所改变的代码 【Unity教程】从0编程制作类银河恶魔城游戏_哔哩哔哩_bilibili Blackhole_Skill_Controller.cs using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine;public class Blackhole_Skill_Controller : MonoBehaviour {[SerializeField] private GameObject hotKeyPrefab;[SerializeField] private ListKeyCode KeyCodeList;private float maxSize;//最大尺寸private float growSpeed;//变大速度private float shrinkSpeed;//缩小速度private bool canGrow true;//是否可以变大private bool canShrink;//缩小private bool canCreateHotKeys true;专门控制后面进入的没法生成热键private bool cloneAttackReleased;private int amountOfAttacks 4;private float cloneAttackCooldown .3f;private float cloneAttackTimer;private ListTransform targets new ListTransform();private ListGameObject createdHotKey new ListGameObject();public void SetupBlackhole(float _maxSize,float _growSpeed,float _shrinkSpeed,int _amountOfAttacks,float _cloneAttackCooldown){maxSize _maxSize;growSpeed _growSpeed;shrinkSpeed _shrinkSpeed;amountOfAttacks _amountOfAttacks;cloneAttackCooldown _cloneAttackCooldown;}private void Update(){cloneAttackTimer - Time.deltaTime;if (Input.GetKeyDown(KeyCode.R)){ReleaseCloneAttack();}CloneAttackLogic();if (canGrow !canShrink){//这是控制物体大小的参数transform.localScale Vector2.Lerp(transform.localScale, new Vector2(maxSize, maxSize), growSpeed * Time.deltaTime);//类似MoveToward不过是放大到多少大小 https://docs.unity3d.com/cn/current/ScriptReference/Vector2.Lerp.html}if (canShrink){transform.localScale Vector2.Lerp(transform.localScale, new Vector2(0, 0), shrinkSpeed * Time.deltaTime);if (transform.localScale.x 0){Destroy(gameObject);}}}private void ReleaseCloneAttack(){cloneAttackReleased true;canCreateHotKeys false;DestroyHotKeys();}private void CloneAttackLogic(){if (cloneAttackTimer 0 cloneAttackReleased){cloneAttackTimer cloneAttackCooldown;int randomIndex Random.Range(0, targets.Count);//限制攻击次数和设置攻击偏移量float _offset;if (Random.Range(0, 100) 50)_offset 2;else_offset -2;SkillManager.instance.clone.CreateClone(targets[randomIndex], new Vector3(_offset, 0, 0));amountOfAttacks--;if (amountOfAttacks 0){canShrink true;cloneAttackReleased false;}}}private void OnTriggerEnter2D(Collider2D collision){if(collision.GetComponentEnemy()!null){collision.GetComponentEnemy().FreezeTime(true);CreateHotKey(collision);}}private void CreateHotKey(Collider2D collision){if(KeyCodeList.Count 0)//当所有的KeyCode都被去除就不在创建实例{return;}if(!canCreateHotKeys)//这是当角色已经开大了不在创建实例{return;}//创建实例GameObject newHotKey Instantiate(hotKeyPrefab, collision.transform.position new Vector3(0, 2), Quaternion.identity);//将实例添加进列表createdHotKey.Add(newHotKey);//随机KeyCode传给HotKey并且传过去一个毁掉一个KeyCode choosenKey KeyCodeList[Random.Range(0, KeyCodeList.Count)];KeyCodeList.Remove(choosenKey);Blackhole_Hotkey_Controller newHotKeyScript newHotKey.GetComponentBlackhole_Hotkey_Controller();newHotKeyScript.SetupHotKey(choosenKey, collision.transform, this);}public void AddEnemyToList(Transform _myEnemy){targets.Add(_myEnemy);}//销毁Hotkeyprivate void DestroyHotKeys(){if(createdHotKey.Count 0){return;}for (int i 0; i createdHotKey.Count; i){Destroy(createdHotKey[i]); }} }Blackhole_Skill.cs using System.Collections; using System.Collections.Generic; using UnityEngine;public class Blackhole_Skill : Skill {[SerializeField]private float maxSize;//最大尺寸[SerializeField] private float growSpeed;//变大速度[SerializeField] private float shrinkSpeed;//缩小速度[SerializeField] int amountOfAttacks 4;[SerializeField] float cloneAttackCooldown .3f;[SerializeField] private GameObject blackholePrefab;public override bool CanUseSkill(){return base.CanUseSkill();}public override void UseSkill(){base.UseSkill();GameObject newBlackhole Instantiate(blackholePrefab);Blackhole_Skill_Controller newBlackholeScripts newBlackhole.GetComponentBlackhole_Skill_Controller();newBlackholeScripts.SetupBlackhole(maxSize,growSpeed,shrinkSpeed,amountOfAttacks,cloneAttackCooldown);}protected override void Start(){base.Start();}protected override void Update(){base.Update();} }
http://www.pierceye.com/news/108032/

相关文章:

  • 做3ds磁铁卡网站大连旅顺博物馆
  • 邢台市住房和城乡建设局网站大连网站推广机构
  • 网站建设开标书房地产网页设计
  • 中国建设建设工程造价管理协会网站建设视频网站要求吗
  • 商务网站教程深圳定制纸箱
  • 湖南手机版建站系统哪家好自己做网站地图
  • 天津网站制作报价阿里云需要网站建设方案书
  • 做最好的美食分享网站网站建设客户需求分析
  • 如何重建网站广州市服务好的网站制作排名
  • 做一名优秀网站设计师计划网站描述怎样写
  • 网页二级网站怎么做网监关闭的网站怎么恢复
  • 甘肃省建设监理协会 官方网站国内知名公关公司
  • 如何将网站和域名绑定阿里云1M做网站
  • 南城网站建设公司咨询东莞智通人才网最新招聘
  • app建设网站公司哪家好php网站修改代码
  • 哪些网上订餐的网站做的好地情网站建设
  • 重庆推广网站的方法国内最近的新闻大事
  • 网站需要备案吗网站怎么推广软文
  • 做设计开哪个素材网站的会员好手机免费网站建设哪家公司好
  • 征婚网站认识的男人做定投保做高级电工题的网站
  • 学做饼干的网站汕头建设学校的网站
  • asp.net做网站原理工资卡app下载
  • 做齐鲁油官方网站集团网站建设报价
  • 网站的收录情况怎么查企业网银怎么登录
  • 网站开发会计处理wordpress阅读随机增加
  • 兰州做网站公司哪家好公司网站建设是什么意思
  • 小区物业管理网站开发报告deal 网站要怎么做
  • seo站长助手wordpress 注册侧边栏
  • 做网站是要编程吗那些网站是html5做的
  • 网站开发图在网站做电子画册