public void SaveBaseStat() { // Pass to level transition entity LevelTransitionStatistics.setKillPoints(killPoints.getValue()); LevelTransitionStatistics.setInfectPoints(infectPoints.getValue()); LevelTransitionStatistics.setMaxHealth(maxHealth.getValue()); LevelTransitionStatistics.setMobileSpeed(mobileSpeed.getValue()); LevelTransitionStatistics.setInfectiousness(infectiousness.getValue()); LevelTransitionStatistics.setDamageMultiplierPercent(damageMultiplierPercent.getValue()); }
// Use this for initialization void Awake() { if (singleton != null) { Debug.LogWarning("Multiple leveltransitionentity detected. Resolved"); Destroy(this); } else { singleton = this; DontDestroyOnLoad(this); } }
public void LoadBaseStat() { // Load from to level transition entity killPoints.setValue(1); // Trigger onhitmin killPoints.setValue(LevelTransitionStatistics.getKillPoints()); infectPoints.setValue(1); // Trigger onhitmin infectPoints.setValue(LevelTransitionStatistics.getInfectPoints()); maxHealth.setMinValue(LevelTransitionStatistics.getMaxHealth()); maxHealth.setValue(LevelTransitionStatistics.getMaxHealth()); mobileSpeed.setMinValue(LevelTransitionStatistics.getMobileSpeed()); mobileSpeed.setValue(LevelTransitionStatistics.getMobileSpeed()); infectiousness.setMinValue(LevelTransitionStatistics.getInfectiousness()); infectiousness.setValue(LevelTransitionStatistics.getInfectiousness()); damageMultiplierPercent.setMinValue(LevelTransitionStatistics.getDamageMultiplier()); damageMultiplierPercent.setValue(LevelTransitionStatistics.getDamageMultiplier()); }