pub struct LevelUpCostDB {
pub stage0: Vec<usize>,
pub elite1: usize,
pub stage1: Vec<usize>,
pub elite2: usize,
pub stage2: Vec<usize>,
}Expand description
计算干员升级所需的所有数据
Fields§
§stage0: Vec<usize>精 0 每升一级需要消耗的资源
elite1: usize精 1 需要的资源
stage1: Vec<usize>精 1 每升一级需要消耗的资源
elite2: usize精 2 需要的资源
stage2: Vec<usize>精 2 每升一级需要消耗的资源
Implementations§
Source§impl LevelUpCostDB
impl LevelUpCostDB
Sourcepub fn star1_cash() -> Self
pub fn star1_cash() -> Self
升级 1 星干员所需要的龙门币
Sourcepub fn star2_cash() -> Self
pub fn star2_cash() -> Self
升级 2 星干员所需要的龙门币
Sourcepub fn star3_cash() -> Self
pub fn star3_cash() -> Self
升级 3 星干员所需要的龙门币
Sourcepub fn star4_cash() -> Self
pub fn star4_cash() -> Self
升级 4 星干员所需要的龙门币
Sourcepub fn star5_cash() -> Self
pub fn star5_cash() -> Self
升级 5 星干员所需要的龙门币
Sourcepub fn star6_cash() -> Self
pub fn star6_cash() -> Self
升级 6 星干员所需要的龙门币
Source§impl LevelUpCostDB
impl LevelUpCostDB
Sourcepub fn can_elite1(&self) -> bool
pub fn can_elite1(&self) -> bool
该干员是否能精1
Sourcepub fn can_elite2(&self) -> bool
pub fn can_elite2(&self) -> bool
该干员是否能精2
Sourcepub fn cost(
&self,
from: (usize, usize),
to: (usize, usize),
) -> Result<usize, String>
pub fn cost( &self, from: (usize, usize), to: (usize, usize), ) -> Result<usize, String>
需要花费的资源量
Sourcepub fn cost_detail(
&self,
from: (usize, usize),
to: (usize, usize),
) -> Result<LevelUpCost, String>
pub fn cost_detail( &self, from: (usize, usize), to: (usize, usize), ) -> Result<LevelUpCost, String>
Trait Implementations§
Source§impl Clone for LevelUpCostDB
impl Clone for LevelUpCostDB
Source§fn clone(&self) -> LevelUpCostDB
fn clone(&self) -> LevelUpCostDB
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LevelUpCostDB
impl Debug for LevelUpCostDB
Source§impl Hash for LevelUpCostDB
impl Hash for LevelUpCostDB
Source§impl PartialEq for LevelUpCostDB
impl PartialEq for LevelUpCostDB
impl Eq for LevelUpCostDB
impl StructuralPartialEq for LevelUpCostDB
Auto Trait Implementations§
impl Freeze for LevelUpCostDB
impl RefUnwindSafe for LevelUpCostDB
impl Send for LevelUpCostDB
impl Sync for LevelUpCostDB
impl Unpin for LevelUpCostDB
impl UnwindSafe for LevelUpCostDB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more