养成基本完毕,新UI,修bug,装备初步,
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ccc48e40c2584d64ab55b464a05cda93, type: 3}
|
||||
m_Name: NewEquipment
|
||||
m_EditorClassIdentifier:
|
||||
level: 1
|
||||
tierPresentations:
|
||||
- tierName:
|
||||
tierIcon: {fileID: 0}
|
||||
tierDescription:
|
||||
- tierName:
|
||||
tierIcon: {fileID: 0}
|
||||
tierDescription:
|
||||
- tierName:
|
||||
tierIcon: {fileID: 0}
|
||||
tierDescription:
|
||||
- tierName:
|
||||
tierIcon: {fileID: 0}
|
||||
tierDescription:
|
||||
- tierName:
|
||||
tierIcon: {fileID: 0}
|
||||
tierDescription:
|
||||
maxHp:
|
||||
basicGain: -0
|
||||
randomRangeStart: 0
|
||||
randomRangeEnd: 0
|
||||
cultivationInterval: 0
|
||||
attack:
|
||||
basicGain: 0
|
||||
randomRangeStart: 0
|
||||
randomRangeEnd: 0
|
||||
cultivationInterval: 0
|
||||
maxMana:
|
||||
basicGain: 0
|
||||
randomRangeStart: 0
|
||||
randomRangeEnd: 0
|
||||
cultivationInterval: 0
|
||||
damageResistance:
|
||||
basicGain: 0
|
||||
randomRangeStart: 0
|
||||
randomRangeEnd: 0
|
||||
cultivationInterval: 0
|
||||
scoreEfficiency:
|
||||
basicGain: 0
|
||||
randomRangeStart: 0
|
||||
randomRangeEnd: 0
|
||||
cultivationInterval: 0
|
||||
specialEffects:
|
||||
- effectType: 0
|
||||
value: 0
|
||||
displayName:
|
||||
displayIcon: {fileID: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 40fe16e436a81644aa688c80436aa1c1
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "NewEquipment", menuName = "Equipment/Equipment SO")]
|
||||
public class equipmentSO : ScriptableObject
|
||||
{
|
||||
public enum EquipmentSpecialEffectType
|
||||
{
|
||||
MaxHp,
|
||||
Attack,
|
||||
MaxMana,
|
||||
DamageResistance,
|
||||
ScoreEfficiency,
|
||||
HitManaRecovery,
|
||||
HitDamageMultiplier,
|
||||
HpLoseBase,
|
||||
Skill
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EquipmentStatTuning
|
||||
{
|
||||
[Range(-0.1f, 0.1f)]
|
||||
public float basicGain = 0f;
|
||||
|
||||
public float randomRangeStart = 0f;
|
||||
public float randomRangeEnd = 0f;
|
||||
|
||||
[Min(0f)]
|
||||
public float cultivationInterval = 0f;
|
||||
|
||||
public void Normalize()
|
||||
{
|
||||
basicGain = Mathf.Clamp(basicGain, -0.1f, 0.1f);
|
||||
cultivationInterval = Mathf.Max(0f, cultivationInterval);
|
||||
|
||||
if (randomRangeEnd < randomRangeStart)
|
||||
{
|
||||
float cached = randomRangeStart;
|
||||
randomRangeStart = randomRangeEnd;
|
||||
randomRangeEnd = cached;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EquipmentTierPresentation
|
||||
{
|
||||
public string tierName;
|
||||
public Sprite tierIcon;
|
||||
[TextArea(2, 6)] public string tierDescription;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class EquipmentSpecialEffect
|
||||
{
|
||||
public EquipmentSpecialEffectType effectType;
|
||||
public float value;
|
||||
public string displayName;
|
||||
public Sprite displayIcon;
|
||||
}
|
||||
|
||||
[Header("Basic Attributes")]
|
||||
[Min(1)] public int level = 1;
|
||||
public EquipmentTierPresentation[] tierPresentations = new EquipmentTierPresentation[5];
|
||||
|
||||
[Header("Max HP")]
|
||||
public EquipmentStatTuning maxHp = new EquipmentStatTuning();
|
||||
|
||||
[Header("Attack")]
|
||||
public EquipmentStatTuning attack = new EquipmentStatTuning();
|
||||
|
||||
[Header("Max Mana")]
|
||||
public EquipmentStatTuning maxMana = new EquipmentStatTuning();
|
||||
|
||||
[Header("Damage Resistance")]
|
||||
public EquipmentStatTuning damageResistance = new EquipmentStatTuning();
|
||||
|
||||
[Header("Score Efficiency")]
|
||||
public EquipmentStatTuning scoreEfficiency = new EquipmentStatTuning();
|
||||
|
||||
[Header("Effect Rules")]
|
||||
public bool onlyProduceSameTypeAttributes = false;
|
||||
|
||||
[Header("Special Effects")]
|
||||
public EquipmentSpecialEffect[] specialEffects = Array.Empty<EquipmentSpecialEffect>();
|
||||
|
||||
[Header("幻化效果")]
|
||||
public EquipmentSpecialEffect[] illusionEffects = Array.Empty<EquipmentSpecialEffect>();
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
level = Mathf.Max(1, level);
|
||||
maxHp?.Normalize();
|
||||
attack?.Normalize();
|
||||
maxMana?.Normalize();
|
||||
damageResistance?.Normalize();
|
||||
scoreEfficiency?.Normalize();
|
||||
|
||||
if (tierPresentations == null)
|
||||
{
|
||||
tierPresentations = new EquipmentTierPresentation[5];
|
||||
}
|
||||
else if (tierPresentations.Length != 5)
|
||||
{
|
||||
Array.Resize(ref tierPresentations, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ccc48e40c2584d64ab55b464a05cda93
|
||||
Reference in New Issue
Block a user