void GetStart() { if (MoRenRunACName == "") { MoRenRunACName = _gameBody.GetRunName(); } YSShanghai = GetComponent <JN_Date>().atkPower; ReSetAll(); GetComponent <AIAirRunNear>().TurnToPlayer(); print(" MoRenRunACName " + MoRenRunACName + " ?????????? _gameBody.GetRunName " + _gameBody.GetRunName()); IsChongjiHX2Start = true; GetTargetPos(); _gameBody.GetAcMsg(CJ_Begin, 2); Audio_CJStart.Play(); }
void HitDownOnGround() { if (!IsHitDownOnGround) { return; } if (IsHuanYuanStand) { if (_gameBody.GetAcMsg(_gameBody.GetStandACName(), 2) == "completed") { IsHitDownOnGround = false; ReSetAll(); _isGetOver = true; } return; } if (_gameBody.GetAcMsg(HitGroundACName) == "completed") { IsHuanYuanStand = true; } //if (_gameBody.GetDB().animation.lastAnimationName == HitGroundACName && _gameBody.GetDB().animation.isCompleted) //{ // IsHitDownOnGround = false; // ReSetAll(); // _isGetOver = true; // return; //} //if (_gameBody.GetDB().animation.lastAnimationName != HitGroundACName) //{ // print("落地动作 " + _gameBody.GetDB().animation.lastAnimationName); // _gameBody.isAcing = true; // _gameBody.GetDB().animation.GotoAndPlayByFrame(HitGroundACName); // print("落地动作 " + _gameBody.GetDB().animation.lastAnimationName); //} }
//bool isHasPlayerACAudio = false; protected virtual void GetAC() { //判断有没有 攻击动作 没有直接退出 if (!_gameBody.GetDB().animation.HasAnimation(ACName)) { print("没有攻击动作 直接退出!!"); ReSetAll(); return; } //防止 侦听 进入 gamebody _gameBody.IsSFSkill = true; //转向 //收招延迟时间 if (ACOverYCTimes != 0) { _gameBody.GetACMsgOverYC(ACOverYCTimes); } //角色 释放动作 print(" ********************************************************** @@@@@@@@@@@@@@@ acName " + ACName); _gameBody.GetAcMsg(ACName); //if (!isHasPlayerACAudio) //{ // isHasPlayerACAudio = true; //} if (ACAudio) { ACAudio.Play(); } //print(" 临时 提高硬直 "+AddYZ); if (AddYZ != 0) { GetComponent <TempAddValues>().TempAddYZ(AddYZ, AddYZTimes); } //起始效果 提示音 光 提示特效 等 //这里是否有 什么释放动作 慢动作 减速 +硬直 等 地上的前置特效 //起手慢动作 if (qishoudongzuoyanchi != 0) { _gameBody.GetPause(qishoudongzuoyanchi, 0); } //print("_gameBody.GetDB().animation.timeScale: "+ _gameBody.GetDB().animation.timeScale); //_gameBody.GetDB().animation.timeScale = 0; //print("_gameBody.GetDB().animation.timeScale2 : " + _gameBody.GetDB().animation.timeScale); }
bool IsOverInStand() { if (!IsInStanding) { IsInStanding = true; //_gameBody.GetDB().animation.FadeIn("stand_1",0.2f,1); _gameBody.GetAcMsg("stand_1", 2); } if (_gameBody.GetDB().animation.lastAnimationName == "stand_1") { return(true); } return(false); }
void GetFire() { //print("fire ac "+ ACName); IsHasFire = true; _gameBody.GetAcMsg(ACName); _gameBody.roleAudio.PlayAudioYS("AudioAtk_1"); if (QishouAudio) { QishouAudio.Play(); } if (ZidanFireAudio && GlobalTools.GetRandomNum() >= 50) { ZidanFireAudio.Play(); } }
public void GetStart() { //停止移动 取消 寻路 和移动 GetComponent <AirGameBody>().GetStop(); //动作 gameBody = GetComponent <GameBody>(); if (gameBody.GetDB().animation.HasAnimation("")) { gameBody.GetAcMsg(""); } //动作做完冲刺弹射 速度用推力还是速度? 测试再看 BumpSpeed = GetJiaodu(); //gameBody.GetPlayerRigidbody2D().AddForce(BumpSpeed*400); //弹力炸弹 //速度的话 要计算速度 总速度 或者 横向速度 //播放特效 TuoWeiTXPlay(); isStart = true; }
void startRunToTarget() { //被攻击 中断 if (GetComponent <RoleDate>().isDie || GetComponent <RoleDate>().isBeHiting) { ReSetAll(); return; } //判断 前面如果撞墙 就结束 if (_gameBody.IsHitWall) { print("------------------------------------------- 冲刺撞墙 "); ReSetAll(); return; } if (IsHasQSAC && !_isQiShiAcOver) { //print("进来没????? " + QishiACName+" shifouhanyouAC "+); //起始动作做完 if (_gameBody.GetDB().animation.lastAnimationName != QishiACName) { //_player.GetComponent<GameBody>().GetDB().animation.GotoAndPlayByFrame(QishiACName); //print("?????????????进来没??"); _gameBody.GetAcMsg(QishiACName); } else { //print("------->> 1"); if (_gameBody.GetDB().animation.isCompleted) { _isQiShiAcOver = true; } } return; } //下压的力 放置 角色飞起来了 //_gameBody.GetPlayerRigidbody2D().AddForce(new Vector2(0, -20)); _gameBody.GetZongTuili(new Vector2(0, -20)); if (runDirection == "right") { _gameBody.RunRight(3f); } else { _gameBody.RunLeft(-3f); } if (Mathf.Abs(this.transform.position.x - _positionX) >= Distances) { ReSetAll(); } if (!IsShowTXAndHitKuai && _isStarting) { //print(" 速度是多少: "+_gameBody.GetPlayerRigidbody2D().velocity.x); if (Mathf.Abs(_gameBody.GetPlayerRigidbody2D().velocity.x) < 3) { return; } IsShowTXAndHitKuai = true; //print("_gameBody.GetDB().animation.lastAnimationName " + _gameBody.GetDB().animation.lastAnimationName); HitKuai.SetActive(true); //HitKuai.transform.position = this.transform.position; ShowTX(); } if (HitKuai) { //hitkuai跟随 特效的位置 后面也可以加一个参照点 跟随参照点 HitKuai.transform.position = Lizi.transform.position; } }
public bool IsGetHide() { //print("IsGetHide!!! "); if (!IsHideing) { return(false); } //这里按类型 分类 如果是 替身术 有烟幕的 另外写 if (YinShenType == 2) { if (!IsStartYinShen) { IsStartYinShen = true; yinshenQianPos = this.transform.position; _gameBody.GetPlayerRigidbody2D().velocity = Vector2.zero; HideXuetiao(); if (!IsCanBeHit) { _roledate.isCanBeHit = false; } ShowYinShenTX(); this.transform.position = new Vector2(this.transform.position.x, this.transform.position.y + 1000); print("--------------------------------------------------shun zou "); } YinShenJiShi += Time.deltaTime; if (YinShenJiShi >= YinShenTimes) { YinShenJiShi = 0; IsHideing = false; return(true); } return(false); } //print(" hide ???? "); if (_db.animation.lastAnimationName == HideACName && _db.animation.isCompleted) { IsHideing = false; print("隐身 动作 完成--------------> " + _db.animation.lastAnimationName); _db.animation.Stop(); _roledate.isCanBeHit = false; //开始显示流程 return(true); } if (_db.animation.lastAnimationName != HideACName) { //print("yinshenAC!"); //_db.animation.GotoAndPlayByFrame(HideACName, 0, 1); _gameBody.GetAcMsg(HideACName); _gameBody.GetPlayerRigidbody2D().velocity = Vector2.zero; _gameBody.SetACPlayScale(YsSpeed); HideXuetiao(); if (!IsCanBeHit) { _roledate.isCanBeHit = false; } } return(false); }