|
|
@@ -33,22 +33,22 @@ public enum PlayerAttackState
|
|
|
|
|
|
public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟�")]
|
|
|
+ [Header("玩家属性")]
|
|
|
public int playerId;
|
|
|
public bool canJump;
|
|
|
public bool canfly;
|
|
|
- public bool endTranSummon; //锟角凤拷锟节斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟劫伙拷英锟斤拷
|
|
|
+ public bool endTranSummon; //是否在结束变身后召唤英灵
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷英锟斤拷")]
|
|
|
- public bool isUltimate; //英锟斤拷锟酵放达拷锟斤拷
|
|
|
- public bool keyTransfigurateRelease; //锟缴匡拷英锟斤拷锟酵放达拷锟叫硷拷
|
|
|
+ [Header("变身英灵")]
|
|
|
+ public bool isUltimate; //英灵释放大招
|
|
|
+ public bool keyTransfigurateRelease; //松开英灵释放大招键
|
|
|
public List<GameObject> changePrefabs;
|
|
|
public int[] needCorpses;
|
|
|
- private GameObject spiritObj; //锟斤拷前锟斤拷锟斤拷锟侥讹拷锟斤拷
|
|
|
- public int endChange = 0; //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟劫伙拷锟斤拷英锟斤拷
|
|
|
+ private GameObject spiritObj; //当前变身的对象
|
|
|
+ public int endChange = 0; //结束变身后召唤的英灵
|
|
|
public Vector2 rightDir;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷")]
|
|
|
+ [Header("玩家组件")]
|
|
|
public UIHP uiMp;
|
|
|
public PlayerRope playerRope;
|
|
|
public EventTrigger eventTrigger;
|
|
|
@@ -59,30 +59,30 @@ public class PlayerController : MoveCharacter
|
|
|
public SkeletonDataAsset[] playerSpine;
|
|
|
private SpiritSystem spiritSystem;
|
|
|
|
|
|
- [Header("血锟斤拷")]
|
|
|
+ [Header("血量")]
|
|
|
private int curHp;
|
|
|
private int curTotalHp;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷")]
|
|
|
+ [Header("蓝耗")]
|
|
|
public float mp;
|
|
|
public float totalMp;
|
|
|
- public float totalMp_2Players; //双锟斤拷模式锟斤拷锟斤拷锟斤拷锟斤拷
|
|
|
+ public float totalMp_2Players; //双人模式下总蓝量
|
|
|
public bool isMpRepel = true;
|
|
|
public bool isRapedReply;
|
|
|
public float mpReplySpeed;
|
|
|
- public float mpReplySpeed_2Players; //双锟斤拷模式锟斤拷锟斤拷锟斤拷锟截革拷锟劫讹拷
|
|
|
+ public float mpReplySpeed_2Players; //双人模式下蓝量回复速度
|
|
|
public float rapidReplySpeed;
|
|
|
public float lostMp;
|
|
|
private float addMp = 10;
|
|
|
public GameObject soul;
|
|
|
public GameObject rapidReplyEffect;
|
|
|
|
|
|
- [Header("锟狡讹拷锟斤拷锟斤拷")]
|
|
|
- public Vector2 moveVec; //锟斤拷也锟斤拷锟绞憋拷贫锟斤拷锟斤拷锟�
|
|
|
+ [Header("移动属性")]
|
|
|
+ public Vector2 moveVec; //玩家不动时移动数据
|
|
|
[HideInInspector]
|
|
|
public Vector2 leftDir;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟�")]
|
|
|
+ [Header("冲刺属性")]
|
|
|
public float rushSpeed = 100;
|
|
|
public float rushCostMp = 5;
|
|
|
public Vector3 rushDir;
|
|
|
@@ -91,43 +91,43 @@ public class PlayerController : MoveCharacter
|
|
|
public float rushTime;
|
|
|
public float totalRushTime = 0.5f;
|
|
|
[HideInInspector]
|
|
|
- public float cacheRushTime; //锟睫凤拷Rush时锟斤拷锟斤拷Rush锟斤拷锟斤拷锟斤拷Rush锟斤拷锟街感诧拷锟矫o拷锟斤拷锟芥几帧锟斤拷锟斤拷锟解几帧锟斤拷锟斤拷鼗锟斤拷锟斤拷锟絉ush;
|
|
|
+ public float cacheRushTime; //无法Rush时按下Rush键不会Rush,手感不好,缓存几帧,在这几帧内落地会立即Rush;
|
|
|
public float totalCacheRushTime = 0.1f;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟斤拷")]
|
|
|
+ [Header("链条属性")]
|
|
|
public float sprintCostMp = 5;
|
|
|
[HideInInspector]
|
|
|
public float cachePullRopeTime;
|
|
|
public float totalCachePullRopeTime = 0.1f;
|
|
|
|
|
|
- [Header("锟斤拷跃锟斤拷锟斤拷")]
|
|
|
+ [Header("跳跃属性")]
|
|
|
public float jumpSpeed = 10;
|
|
|
public float airJumpSpeed = 10;
|
|
|
public int airJumped;
|
|
|
- public int airJumpNumber = 1; //锟斤拷锟斤拷锟皆撅拷锟斤拷锟�
|
|
|
- public float canAirJumpSpeed = 5;//y锟斤拷锟劫度达拷锟斤拷锟斤拷锟街凳憋拷锟斤拷芙锟斤拷锌锟斤拷锟斤拷锟皆�
|
|
|
+ public int airJumpNumber = 1; //最大跳跃次数
|
|
|
+ public float canAirJumpSpeed = 5;//y轴速度大于这个值时不能进行空中跳跃
|
|
|
[HideInInspector]
|
|
|
- public float canJumpTime; //锟诫开平台锟斤拷锟斤拷然锟斤拷锟斤拷锟斤拷跃锟斤拷时锟戒,锟斤拷锟斤拷锟斤拷锟斤拷锟街革拷
|
|
|
+ public float canJumpTime; //离开平台后仍然可以跳跃的时间,用于提升手感
|
|
|
public float leaveGroundCanJumpTime = 0.1f;
|
|
|
[HideInInspector]
|
|
|
- public float cacheJumpTime; //锟斤拷锟斤拷锟斤拷锟绞憋拷锟斤拷锟斤拷锟皆撅拷锟斤拷锟斤拷锟斤拷锟皆撅拷锟斤拷指胁锟斤拷茫锟斤拷锟斤拷婕钢★拷锟斤拷锟斤拷饧钢★拷锟斤拷锟截伙拷锟斤拷锟斤拷锟斤拷跃;
|
|
|
+ public float cacheJumpTime; //即将落地时按下跳跃键不会跳跃,手感不好,缓存几帧,在这几帧内落地会立即跳跃;
|
|
|
public float totalCacheJumpTime = 0.1f;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟斤拷")]
|
|
|
+ [Header("飞行属性")]
|
|
|
public float flySpeed = 5;
|
|
|
public float maxFlyHeight;
|
|
|
|
|
|
- [Header("锟劫伙拷锟斤拷锟斤拷")]
|
|
|
- public float cacheDir; //锟劫伙拷锟斤拷时锟斤拷锟斤拷锟斤拷锟劫伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷应锟街感诧拷锟矫o拷锟斤拷锟斤拷一锟铰o拷锟劫伙拷锟斤拷摇锟节硷拷锟斤拷锟斤拷锟斤拷锟斤拷应锟侥伙拷锟斤拷转锟斤拷
|
|
|
+ [Header("召唤属性")]
|
|
|
+ public float cacheDir; //召唤的时候按左右召唤结束不会响应手感不好,缓存一下,召唤后摇期间有左右响应的话会转向
|
|
|
[HideInInspector]
|
|
|
public float summonTime;
|
|
|
[HideInInspector]
|
|
|
- public float cacheSummonTime; //锟睫凤拷锟劫伙拷时锟斤拷锟斤拷锟劫伙拷锟斤拷锟斤拷锟斤拷锟劫伙拷锟斤拷锟街感诧拷锟矫o拷锟斤拷锟芥几帧锟斤拷锟斤拷锟解几帧锟斤拷锟斤拷鼗锟斤拷锟斤拷锟斤拷倩锟�;
|
|
|
+ public float cacheSummonTime; //无法召唤时按下召唤键不会召唤,手感不好,缓存几帧,在这几帧内落地会立即召唤;
|
|
|
[HideInInspector]
|
|
|
public int cacheSummonId;
|
|
|
|
|
|
|
|
|
- [Header("锟劫伙拷使魔")]
|
|
|
+ [Header("召唤使魔")]
|
|
|
public List<GameObject> demonicPrefabs;
|
|
|
public List<Vector3> demonicSummonPos;
|
|
|
public Dictionary<int, List<Demonic>> demonicDic;
|
|
|
@@ -135,80 +135,80 @@ public class PlayerController : MoveCharacter
|
|
|
private List<Demonic> giants = new List<Demonic>();
|
|
|
private List<Demonic> swords = new List<Demonic>();
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷")]
|
|
|
+ [Header("攻击")]
|
|
|
public PlayerAttackState attackState;
|
|
|
public float attackMoveSpeed = 5f;
|
|
|
[HideInInspector]
|
|
|
- public float cacheAttackTime; //锟睫凤拷锟斤拷锟斤拷时锟斤拷锟铰癸拷锟斤拷锟斤拷锟斤拷锟结攻锟斤拷锟斤拷锟街感诧拷锟矫o拷锟斤拷锟芥几帧锟斤拷锟斤拷锟解几帧锟斤拷锟斤拷鼗锟斤拷锟斤拷锟斤拷锟斤拷锟�;
|
|
|
+ public float cacheAttackTime; //无法攻击时按下攻击键不会攻击,手感不好,缓存几帧,在这几帧内落地会立即攻击;
|
|
|
public float totalCacheAttackTime = 0.1f;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷")]
|
|
|
- public float reviveTime; //锟斤拷锟斤拷时锟斤拷
|
|
|
+ [Header("复活")]
|
|
|
+ public float reviveTime; //复活时间
|
|
|
public float totalReviveTime;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷欠锟斤拷诨锟斤拷锟�")]
|
|
|
+ [Header("玩家是否在基地")]
|
|
|
public bool isBaseBtnOut = false;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷")]
|
|
|
+ [Header("八卦")]
|
|
|
public ChooseYinYang chooseYinYang;
|
|
|
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷")]
|
|
|
+ [Header("锁魂塔")]
|
|
|
public GameObject curSoulTower;
|
|
|
|
|
|
- //指锟接癸拷锟斤拷
|
|
|
- private float conductTime; //指锟接帮拷锟斤拷锟斤拷锟斤拷时锟斤拷
|
|
|
- private int nowConductButton = -1; //锟斤拷锟节帮拷锟铰碉拷指锟接硷拷锟斤拷0.J/1.K/2.L/-1.锟睫o拷
|
|
|
+ //指挥功能
|
|
|
+ private float conductTime; //指挥按键长按时间
|
|
|
+ private int nowConductButton = -1; //现在按下的指挥键(0.J/1.K/2.L/-1.无)
|
|
|
private int cacheConductId;
|
|
|
- [Header("锟劫伙拷锟斤拷应时锟斤拷")] [Tooltip("锟节达拷时锟斤拷锟斤拷锟斤拷锟斤拷为锟劫伙拷")] public float totalCacheSummonTime;
|
|
|
- [Header("指锟斤拷锟斤拷应时锟斤拷")] [Tooltip("锟节达拷时锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为指锟斤拷")] public float[] canConductTime;
|
|
|
- [Header("指锟接硷拷锟斤拷")] [Tooltip("选锟斤拷锟斤拷应锟斤拷指锟接硷拷锟斤拷")] public ConductSkills[] conductSkills;
|
|
|
- public bool[] conductCanRelease; //锟杰凤拷锟斤拷锟街革拷蛹锟斤拷锟斤拷锟阶刺�
|
|
|
- public ConductReadyTip conductReadyTip; //指锟接硷拷锟斤拷锟斤拷
|
|
|
+ [Header("召唤相应时间")] [Tooltip("在此时间内松手为召唤")] public float totalCacheSummonTime;
|
|
|
+ [Header("指挥相应时间")] [Tooltip("在此时间以外松手为指挥")] public float[] canConductTime;
|
|
|
+ [Header("指挥技能")] [Tooltip("选择相应的指挥技能")] public ConductSkills[] conductSkills;
|
|
|
+ public bool[] conductCanRelease; //能否进入指挥技蓄力状态
|
|
|
+ public ConductReadyTip conductReadyTip; //指挥技就绪
|
|
|
private bool isReadyConduct;
|
|
|
- [Header("时锟戒倍锟斤拷")] [Tooltip("时锟斤拷锟劫度凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷")] public float timeSlowingMultiplier;
|
|
|
+ [Header("时间倍率")] [Tooltip("时间速度放慢到正常的几倍")] public float timeSlowingMultiplier;
|
|
|
public float readyTipFxTime;
|
|
|
- [Header("转锟斤拷锟斤拷")] public float[] conversionRate;
|
|
|
- //锟斤拷锟斤拷锟斤拷
|
|
|
- [Header("锟节猴拷锟斤拷时血锟斤拷锟斤拷锟斤拷")] public int temptHp;
|
|
|
- [Header("锟节猴拷血锟斤拷锟斤拷锟斤拷时锟斤拷")]public float temptTime;
|
|
|
+ [Header("转换率")] public float[] conversionRate;
|
|
|
+ //大胖子
|
|
|
+ [Header("融合临时血量基数")] public int temptHp;
|
|
|
+ [Header("融合血量持续时间")]public float temptTime;
|
|
|
public GameObject[] bigGiant;
|
|
|
public float[] stageSize;
|
|
|
public int[] giantDieNum;
|
|
|
- //锟斤拷锟斤拷
|
|
|
+ //光球
|
|
|
public GameObject photosphereObj;
|
|
|
- [Header("锟斤拷锟斤拷血锟斤拷锟斤拷锟斤拷")] public int photosphereHp;
|
|
|
- //锟斤拷锟斤拷锟斤拷
|
|
|
+ [Header("光球血量基数")] public int photosphereHp;
|
|
|
+ //攻击力
|
|
|
public GameObject attackEffect;
|
|
|
- //泰山压锟斤拷
|
|
|
+ //泰山压顶
|
|
|
public GameObject mountain;
|
|
|
public Vector3 mountainOffset;
|
|
|
- //锟斤拷锟斤拷锟斤拷
|
|
|
+ //气功波
|
|
|
public GameObject wavePowerObj;
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟剿猴拷锟斤拷锟斤拷")]public int wavePowerDamage;
|
|
|
- //锟斤拷锟斤拷锟斤拷
|
|
|
+ [Header("气功波伤害基数")]public int wavePowerDamage;
|
|
|
+ //御剑术
|
|
|
public GameObject flyingSwordsObj;
|
|
|
- [Header("锟斤拷锟斤拷锟斤拷锟剿猴拷")] public int swordsDamage;
|
|
|
- //怨锟斤拷锟斤拷
|
|
|
+ [Header("御剑术伤害")] public int swordsDamage;
|
|
|
+ //怨气弹
|
|
|
public GameObject angryBulletObj;
|
|
|
- [Header("怨锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷")] public int angryBulletNum;
|
|
|
- //锟斤拷锟轿飞斤拷
|
|
|
+ [Header("怨气弹数量基数")] public int angryBulletNum;
|
|
|
+ //扇形飞剑
|
|
|
public GameObject fanFlyingSwords;
|
|
|
- [Header("锟缴斤拷锟角度凤拷围")]public float flyingSwordsAngleRange;
|
|
|
- [Header("锟缴斤拷锟角讹拷锟斤拷锟斤拷锟�")] public float flyintSwordsArrivalAngle;
|
|
|
- [Header("锟缴斤拷锟斤拷锟斤拷锟斤拷锟斤拷")] public int flyingSwordsNum;
|
|
|
+ [Header("飞剑角度范围")]public float flyingSwordsAngleRange;
|
|
|
+ [Header("飞剑角度入射角")] public float flyintSwordsArrivalAngle;
|
|
|
+ [Header("飞剑数量基数")] public int flyingSwordsNum;
|
|
|
|
|
|
public enum ConductSkills
|
|
|
{
|
|
|
- Giant, //锟斤拷锟接o拷锟较成达拷锟斤拷锟斤拷
|
|
|
- Photosphere, //锟斤拷锟接o拷锟斤拷锟斤拷
|
|
|
- AddAttack, //锟斤拷锟接o拷锟斤拷锟接癸拷锟斤拷锟斤拷
|
|
|
+ Giant, //胖子:合成大胖子
|
|
|
+ Photosphere, //胖子:光球
|
|
|
+ AddAttack, //胖子:增加攻击力
|
|
|
|
|
|
- Mountain, //锟斤拷锟斤拷师锟斤拷泰山压锟斤拷
|
|
|
- WavePower, //锟斤拷锟斤拷师锟斤拷锟斤拷锟斤拷锟斤拷
|
|
|
- SwordsControl, //锟斤拷锟斤拷师锟斤拷锟斤拷锟斤拷锟斤拷
|
|
|
+ Mountain, //气功师:泰山压顶
|
|
|
+ WavePower, //气功师:气功波
|
|
|
+ SwordsControl, //气功师:御剑术
|
|
|
|
|
|
- AngryBullet, //锟斤拷锟斤拷锟街o拷怨锟斤拷锟斤拷
|
|
|
- FlyingSwords, //锟斤拷锟轿飞斤拷
|
|
|
+ AngryBullet, //弓箭手:怨气弹
|
|
|
+ FlyingSwords, //扇形飞剑
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -415,7 +415,7 @@ public class PlayerController : MoveCharacter
|
|
|
SpiritSystem.player2 = gameObject;
|
|
|
SpiritSystem.p2Spirits = GetComponent<Spirits>();
|
|
|
|
|
|
- //锟叫伙拷为双锟剿硷拷锟斤拷锟斤拷锟斤拷锟斤拷式
|
|
|
+ //切换为双人计算蓝量方式
|
|
|
PlayerController p1 = PlayersInput.instance[0];
|
|
|
mpReplySpeed = mpReplySpeed_2Players;
|
|
|
p1.mpReplySpeed = mpReplySpeed_2Players;
|
|
|
@@ -455,7 +455,7 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
CharacterFloat();
|
|
|
}
|
|
|
- /* //锟斤拷时锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟�
|
|
|
+ /* //到时间自动解除变身
|
|
|
if (endChange != 0)
|
|
|
{
|
|
|
pastChangeTime += Time.deltaTime;
|
|
|
@@ -507,10 +507,10 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
LBisHold = false;
|
|
|
}
|
|
|
- //锟街憋拷锟斤拷锟斤拷LB
|
|
|
+ //手柄按下LB
|
|
|
[HideInInspector]
|
|
|
public bool LBisHold;
|
|
|
- //锟斤拷取锟街憋拷锟斤拷锟斤拷
|
|
|
+ //读取手柄参数
|
|
|
private void OnMove(InputValue value)
|
|
|
{
|
|
|
if (canMove)
|
|
|
@@ -591,7 +591,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //选英锟斤拷 锟斤拷锟街憋拷锟揭帮拷锟斤拷锟斤拷锟斤拷锟絋AB锟斤拷
|
|
|
+ //选英灵 (手柄右扳机,键盘TAB)
|
|
|
void OnChooseSpirit()
|
|
|
{
|
|
|
switch (playerId)
|
|
|
@@ -607,14 +607,14 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //选英锟介(锟街憋拷锟斤拷摇锟剿o拷小锟斤拷锟斤拷锟斤拷锟揭o拷
|
|
|
+ //选英灵(手柄右摇杆,小键盘左右)
|
|
|
void OnChooseSpirit_LR(InputValue value)
|
|
|
{
|
|
|
rightDir = value.Get<Vector2>();
|
|
|
|
|
|
}
|
|
|
|
|
|
- //锟劫伙拷英锟斤拷
|
|
|
+ //召唤英灵
|
|
|
void OnTransfigurate()
|
|
|
{
|
|
|
if (!keyTransfigurateRelease && !isFloat && canMove && !isBaseBtnOut)
|
|
|
@@ -623,7 +623,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //锟缴匡拷锟斤拷锟斤拷英锟斤拷锟�
|
|
|
+ //松开变身英灵键
|
|
|
void OnTransfigurateUp()
|
|
|
{
|
|
|
if (!isBaseBtnOut)
|
|
|
@@ -770,7 +770,7 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
switch (conductSkills[cacheConductId])
|
|
|
{
|
|
|
- //锟斤拷锟斤拷
|
|
|
+ //胖子
|
|
|
case ConductSkills.Giant:
|
|
|
GameObject demonicObj = PoolManager.Instantiate(bigGiant[cacheConductId]);
|
|
|
Demonic demonic = demonicObj.GetComponent<Demonic>();
|
|
|
@@ -840,7 +840,7 @@ public class PlayerController : MoveCharacter
|
|
|
// }
|
|
|
//}
|
|
|
break;
|
|
|
- //锟斤拷锟斤拷师
|
|
|
+ //气功师
|
|
|
case ConductSkills.Mountain:
|
|
|
conductCanRelease[cacheConductId] = false;
|
|
|
GameObject curMountain = Instantiate(mountain, null);
|
|
|
@@ -872,7 +872,7 @@ public class PlayerController : MoveCharacter
|
|
|
swordsControl.conductId = cacheConductId;
|
|
|
swordsControl.damage = swordsDamage * boostNum;
|
|
|
break;
|
|
|
- //锟斤拷锟斤拷锟斤拷
|
|
|
+ //弓箭手
|
|
|
case ConductSkills.AngryBullet:
|
|
|
conductCanRelease[cacheConductId] = false;
|
|
|
obj = Instantiate(angryBulletObj);
|
|
|
@@ -894,13 +894,13 @@ public class PlayerController : MoveCharacter
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- print("使魔锟斤拷锟斤拷");
|
|
|
+ print("使魔不足");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- //锟斤拷色锟斤拷锟节匡拷锟斤拷锟缴活动状态时锟斤拷通锟斤拷锟叫伙拷状态锟竭硷拷锟斤拷锟斤拷Idle锟斤拷Run状态锟斤拷锟皆硷拷锟斤拷锟阶刺�拷锟斤拷锟绞弊硷拷锟斤拷氐锟絀dle状态前
|
|
|
+ //角色处于可自由活动状态时的通用切换状态逻辑,如Idle、Run状态,以及别的状态结束时准备回到Idle状态前
|
|
|
public bool CheckPlayerChangeState(CharacterState excludeState = CharacterState.None)
|
|
|
{
|
|
|
if (!foot.TrigGround)
|
|
|
@@ -1226,14 +1226,14 @@ public class PlayerController : MoveCharacter
|
|
|
rb.linearVelocity = AirMove(rb.linearVelocity);
|
|
|
break;
|
|
|
//case CharacterState.Hurt:
|
|
|
- // if (hurtKeepTime <= 0 && rb.velocity.magnitude < hurtChangeVelocity)
|
|
|
+ // if (hurtKeepTime <= 0 && rb.linearVelocity.magnitude < hurtChangeVelocity)
|
|
|
// {
|
|
|
// if (CheckPlayerChangeState())
|
|
|
// {
|
|
|
// break;
|
|
|
// }
|
|
|
// }
|
|
|
- // Vector3 vel = rb.velocity;
|
|
|
+ // Vector3 vel = rb.linearVelocity;
|
|
|
// if (!foot.TrigGround)
|
|
|
// {
|
|
|
// if (canfly)
|
|
|
@@ -1247,7 +1247,7 @@ public class PlayerController : MoveCharacter
|
|
|
|
|
|
// }
|
|
|
// vel.x = vel.x * (1 - decelerationRatio * Time.deltaTime);
|
|
|
- // rb.velocity = vel;
|
|
|
+ // rb.linearVelocity = vel;
|
|
|
// CachedPlayerInput();
|
|
|
// break;
|
|
|
case CharacterState.Coma:
|
|
|
@@ -1959,12 +1959,12 @@ public class PlayerController : MoveCharacter
|
|
|
return velocity;
|
|
|
}
|
|
|
|
|
|
- public void Transfiguration(int id) //锟斤拷锟斤拷
|
|
|
+ public void Transfiguration(int id) //变身
|
|
|
{
|
|
|
id = id - 3;
|
|
|
if (id >= changePrefabs.Count)
|
|
|
{
|
|
|
- Debug.LogError("未锟斤拷锟斤拷" + id + "锟脚憋拷锟斤拷");
|
|
|
+ Debug.LogError("未配置" + id + "号变身");
|
|
|
return;
|
|
|
}
|
|
|
GameObject prefab = changePrefabs[id];
|
|
|
@@ -2014,7 +2014,7 @@ public class PlayerController : MoveCharacter
|
|
|
canJump = false;
|
|
|
rb.useGravity = false;
|
|
|
}
|
|
|
- /* 锟斤拷师锟斤拷锟斤拷锟酵放革拷锟秸筹拷
|
|
|
+ /* 法师出场释放浮空场
|
|
|
if (id == 3)
|
|
|
{
|
|
|
if ((int)spirits.currentSpirit == 0)
|
|
|
@@ -2038,12 +2038,12 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
if (id >= demonicPrefabs.Count)
|
|
|
{
|
|
|
- Debug.LogError("未锟斤拷锟斤拷" + id + "锟斤拷使魔");
|
|
|
+ Debug.LogError("未配置" + id + "号使魔");
|
|
|
return;
|
|
|
}
|
|
|
if (id >= demonicSummonPos.Count)
|
|
|
{
|
|
|
- Debug.LogError("未锟斤拷锟斤拷" + id + "锟斤拷使魔锟劫伙拷位锟斤拷");
|
|
|
+ Debug.LogError("未配置" + id + "号使魔召唤位置");
|
|
|
return;
|
|
|
}
|
|
|
GameObject prefab;
|
|
|
@@ -2106,7 +2106,7 @@ public class PlayerController : MoveCharacter
|
|
|
{
|
|
|
demonic.Attack1();
|
|
|
}
|
|
|
- //id 3~6 为锟侥革拷英锟斤拷
|
|
|
+ //id 3~6 为四个英灵
|
|
|
if (id >= 3 && id <= 6)
|
|
|
{
|
|
|
spirits.ultimateTimes[spirits.nowSpirit] -= 1;
|
|
|
@@ -2147,7 +2147,7 @@ public class PlayerController : MoveCharacter
|
|
|
float costMp = prefab.GetComponent<Demonic>().costMp;
|
|
|
if (mp < costMp)
|
|
|
{
|
|
|
- Debug.Log("mp锟斤拷锟斤拷锟劫伙拷失锟斤拷, 锟斤拷锟矫加革拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷效啥锟斤拷");
|
|
|
+ Debug.Log("mp不足召唤失败, 还得加个动画或者音效啥的");
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|