技能bug修复
This commit is contained in:
parent
223b42a0ae
commit
4ee13b9d0b
@ -397,7 +397,7 @@
|
|||||||
"S_1": {
|
"S_1": {
|
||||||
"1": {
|
"1": {
|
||||||
"SkillList": [
|
"SkillList": [
|
||||||
"0"
|
"skill_7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"2": {
|
"2": {
|
||||||
@ -411,7 +411,9 @@
|
|||||||
"DamageBuff": 0.35
|
"DamageBuff": 0.35
|
||||||
},
|
},
|
||||||
"5": {
|
"5": {
|
||||||
"DamageBuff": 0.3,
|
"SkillList": [
|
||||||
|
"skill_6"
|
||||||
|
],
|
||||||
"speedOfBullets": -0.1
|
"speedOfBullets": -0.1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -424,7 +426,7 @@
|
|||||||
},
|
},
|
||||||
"3": {
|
"3": {
|
||||||
"numberOfBullets": 1,
|
"numberOfBullets": 1,
|
||||||
"speedOfBullets": -1
|
"speedOfBullets": -0.1
|
||||||
},
|
},
|
||||||
"4": {
|
"4": {
|
||||||
"DamageBuff": 0.35
|
"DamageBuff": 0.35
|
||||||
|
@ -4853,6 +4853,7 @@ MonoBehaviour:
|
|||||||
IsMove: 1
|
IsMove: 1
|
||||||
Collider2D: {fileID: 4606866971114100020}
|
Collider2D: {fileID: 4606866971114100020}
|
||||||
effectPres: []
|
effectPres: []
|
||||||
|
timer: 0
|
||||||
NumberOfBulletAttacks: 1
|
NumberOfBulletAttacks: 1
|
||||||
Target: {fileID: 0}
|
Target: {fileID: 0}
|
||||||
noLockEnemy: 0
|
noLockEnemy: 0
|
||||||
|
@ -419,7 +419,7 @@ GameObject:
|
|||||||
- component: {fileID: 8433650274028726420}
|
- component: {fileID: 8433650274028726420}
|
||||||
- component: {fileID: -3836672401185760439}
|
- component: {fileID: -3836672401185760439}
|
||||||
- component: {fileID: 1608620729910401442}
|
- component: {fileID: 1608620729910401442}
|
||||||
- component: {fileID: 2427917370826210288}
|
- component: {fileID: 6754849144717393997}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: jbf
|
m_Name: jbf
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
@ -514,7 +514,7 @@ MonoBehaviour:
|
|||||||
normalIndex: 0
|
normalIndex: 0
|
||||||
isHit: 0
|
isHit: 0
|
||||||
myTags: 0
|
myTags: 0
|
||||||
mySkillUp: {fileID: 2427917370826210288}
|
mySkillUp: {fileID: 6754849144717393997}
|
||||||
IsDead: 0
|
IsDead: 0
|
||||||
HaveDieTime: 0
|
HaveDieTime: 0
|
||||||
enemyId:
|
enemyId:
|
||||||
@ -573,7 +573,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
tower: {fileID: 0}
|
tower: {fileID: 0}
|
||||||
Tag: tower
|
Tag: tower
|
||||||
--- !u!114 &2427917370826210288
|
--- !u!114 &6754849144717393997
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
@ -582,7 +582,7 @@ MonoBehaviour:
|
|||||||
m_GameObject: {fileID: 8433650275485930554}
|
m_GameObject: {fileID: 8433650275485930554}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_EditorHideFlags: 0
|
m_EditorHideFlags: 0
|
||||||
m_Script: {fileID: 11500000, guid: 8264f0a4afc0aa347bf9dad42df2617a, type: 3}
|
m_Script: {fileID: 11500000, guid: 06f1271e2c91952498f98563968b9cae, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
description: "\u66F4\u65B0\u540E\u7684\u840C\u5996\uFF0C\uFF1A\u4F7F\u7528\u65B9\u6CD5xxxxxxxx"
|
description: "\u66F4\u65B0\u540E\u7684\u840C\u5996\uFF0C\uFF1A\u4F7F\u7528\u65B9\u6CD5xxxxxxxx"
|
||||||
|
@ -34202,27 +34202,27 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_AnchorMax.y
|
propertyPath: m_AnchorMax.y
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_AnchorMin.y
|
propertyPath: m_AnchorMin.y
|
||||||
value: 0
|
value: 1
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_SizeDelta.x
|
propertyPath: m_SizeDelta.x
|
||||||
value: 0
|
value: 600
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_SizeDelta.y
|
propertyPath: m_SizeDelta.y
|
||||||
value: 0
|
value: 733
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 0
|
value: 300
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593699687250, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_AnchoredPosition.y
|
propertyPath: m_AnchoredPosition.y
|
||||||
value: 0
|
value: -366.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 3011360593729086421, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
- target: {fileID: 3011360593729086421, guid: a8cc81ed2c5736a46a14628d8d489ac4, type: 3}
|
||||||
propertyPath: m_Sprite
|
propertyPath: m_Sprite
|
||||||
|
@ -21,7 +21,7 @@ public class SkillUp : Fun
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
attackRange=value;
|
attackRange=value;
|
||||||
role.AttackRange +=attackRange;
|
role.AttackRange += value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ public class SkillUp : Fun
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
attackCooldown = value;
|
attackCooldown = value;
|
||||||
role.AttackCD *= (1 + attackCooldown);
|
role.AttackCD *= (1 + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ public class SkillUp : Fun
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
attackDuration = value;
|
attackDuration = value;
|
||||||
attack.AttackStayTime *= (1 + attackDuration);
|
attack.AttackStayTime *= (1 + value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[HideInInspector][Header("攻击子弹数量加成")] public int numberOfBullets = 0;
|
[HideInInspector][Header("攻击子弹数量加成")] public int numberOfBullets = 0;
|
||||||
@ -58,7 +58,11 @@ public class SkillUp : Fun
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
numberOfBullets = value;
|
numberOfBullets = value;
|
||||||
attack.BulletNumber += numberOfBullets;
|
// Debug.Log("NumberOfBullets:"+ NumberOfBullets);
|
||||||
|
Debug.Log("value:" + value);
|
||||||
|
attack.BulletNumber += value;
|
||||||
|
// Debug.Log("attack.BulletNumber:" + attack.BulletNumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[HideInInspector][Header("攻击子弹速度加成")] public float speedOfBullets = 0f;
|
[HideInInspector][Header("攻击子弹速度加成")] public float speedOfBullets = 0f;
|
||||||
@ -70,7 +74,7 @@ public class SkillUp : Fun
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
speedOfBullets = value;
|
speedOfBullets = value;
|
||||||
attack.roleBulletSpeedAdd *= (1+speedOfBullets);
|
attack.roleBulletSpeedAdd *= (1+ value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,17 +104,27 @@ public class SkillUp : Fun
|
|||||||
|
|
||||||
|
|
||||||
SkillLevelData info = Mengyao_Skill_Date.instance.parsedData[mengyao_id][skill_id][level];
|
SkillLevelData info = Mengyao_Skill_Date.instance.parsedData[mengyao_id][skill_id][level];
|
||||||
|
|
||||||
|
|
||||||
|
//Debug.Log("mengyao_id:" + mengyao_id+ "skill_id:" + skill_id+ "level:" + level+ "info.numberOfBullets:" + info.numberOfBullets);
|
||||||
|
|
||||||
|
// Debug.Log("info.numberOfBullets:"+info.numberOfBullets);
|
||||||
|
|
||||||
//攻击范围加成
|
//攻击范围加成
|
||||||
AttackRange += info.Range;
|
AttackRange = info.Range;
|
||||||
Debug.Log("¹¥»÷·¶Î§+"+ info.Range +"||"+ attackRange.ToString()+"=================================");
|
// Debug.Log("攻击范围+"+ info.Range +"||"+ attackRange.ToString()+"=================================");
|
||||||
//攻击冷却加成
|
//攻击冷却加成
|
||||||
AttackCooldown += info.AttackCooldown;
|
AttackCooldown = info.AttackCooldown;
|
||||||
//攻击持续时间加成
|
//攻击持续时间加成
|
||||||
AttackDuration += info.AttackContinues;
|
AttackDuration = info.AttackContinues;
|
||||||
|
|
||||||
|
Debug.Log("攻击子弹数量加成+info.numberOfBullets:" + info.numberOfBullets);
|
||||||
//攻击子弹数量加成
|
//攻击子弹数量加成
|
||||||
NumberOfBullets += info.numberOfBullets;
|
NumberOfBullets = info.numberOfBullets;
|
||||||
//攻击子弹速度加成
|
//攻击子弹速度加成
|
||||||
SpeedOfBullets += info.speedOfBullets;
|
SpeedOfBullets = info.speedOfBullets;
|
||||||
|
|
||||||
|
// Debug.Log("攻击子弹数量加成:" + NumberOfBullets);
|
||||||
|
|
||||||
//攻击伤害加成
|
//攻击伤害加成
|
||||||
DamageUp += info.DamageBuff;
|
DamageUp += info.DamageBuff;
|
||||||
|
91
meng_yao/Assets/script/A_Fight/SkillUp/jbf_SkillUp.cs
Normal file
91
meng_yao/Assets/script/A_Fight/SkillUp/jbf_SkillUp.cs
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Unity.VisualScripting;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class jbf_SkillUp : SkillUp
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 射程提升1格位置
|
||||||
|
/// </summary>
|
||||||
|
///
|
||||||
|
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void useskill(string str)
|
||||||
|
{
|
||||||
|
if (str == "skill_6") /// 每次攻击额外造成30%魔法伤害,刀的旋转速度减少10%
|
||||||
|
{
|
||||||
|
attack.haveAddDamage = true;
|
||||||
|
attack.AdddamageType = DamageType.magicDamage;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str == "skill_7") ///刀的长度延长1格
|
||||||
|
{
|
||||||
|
|
||||||
|
attack.bulletLengthAdd += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*public override void Skill_1_1()
|
||||||
|
{
|
||||||
|
base.AttackRange = 1;
|
||||||
|
attack.SetAttackRange();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 攻击CD减少10%
|
||||||
|
/// </summary>
|
||||||
|
public override void Skill_1_3()
|
||||||
|
{
|
||||||
|
|
||||||
|
base.AttackCooldown -= 0.1f;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 每次扇形喷出3个毒雾攻击CD增加5%
|
||||||
|
/// </summary>
|
||||||
|
public override void Skill_1_5()
|
||||||
|
{
|
||||||
|
attack.BulletNumber = 3;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人中毒后受到伤害提升20%
|
||||||
|
/// </summary>
|
||||||
|
public override void Skill_2_1()
|
||||||
|
{
|
||||||
|
poisonDamage *= 1.2f;
|
||||||
|
SetPoisonBuff();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人中毒后毒药生效时间减少30% 攻击CD增加5%
|
||||||
|
/// </summary>
|
||||||
|
public override void Skill_2_3()
|
||||||
|
{
|
||||||
|
base.AttackCooldown += 0.05f;
|
||||||
|
poisonInterval *= 0.7f;
|
||||||
|
SetPoisonBuff();
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 敌人中毒后受到伤害提升50%,攻击CD增加5%
|
||||||
|
/// </summary>
|
||||||
|
public override void Skill_2_5()
|
||||||
|
{
|
||||||
|
|
||||||
|
base.AttackCooldown += 0.05f;
|
||||||
|
poisonDamage *= 1.5f;
|
||||||
|
SetPoisonBuff();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
11
meng_yao/Assets/script/A_Fight/SkillUp/jbf_SkillUp.cs.meta
Normal file
11
meng_yao/Assets/script/A_Fight/SkillUp/jbf_SkillUp.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 06f1271e2c91952498f98563968b9cae
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user