public void ChangeCore(BaseCore core) { float HpRate = _mPlayerRobot.CurrentHp / (float)_mPlayerRobot.MaxHp; this._mPlayerRobot.Core = core; _mPlayerRobot.MaxHp = core.CurrentHpPoint; _mPlayerRobot.CurrentHp = (int)(_mPlayerRobot.MaxHp * HpRate); }
public PlayerRobot(PlayerRobotContral PRC, BaseCore core, float moveSpeed) { Core = core; MoveSpeed = moveSpeed; CurrentHp = MaxHp = core.CurrentHpPoint; CurrentMp = MaxMp = core.TotalPoint - core.CurrentHpPoint; this.PRC = PRC; SecondAction += RecoverMp; SyncHpMp(); }
private static void ConfigBuilderTest() { var config1 = BaseCore.Configuration; //Console.WriteLine("1 :"+config1.GetValue<dynamic>("apollo").ObjToJson()); Console.WriteLine("1 :" + config1.GetSection("Logging:IncludeScopes").ObjToJson()); BaseCore.InitConfigurationBuilder((a) => { a.AddJsonFile("appsettings02.json", optional: true, reloadOnChange: true); }); var config2 = BaseCore.Configuration; Console.WriteLine("2 :" + config1.GetSection("Logging:IncludeScopes").ObjToJson()); Console.WriteLine("2 :" + config2.GetSection("apollo:appid").Value); }
//----------------------------------------------------------------------------------- //外部调用 /// <summary> /// 核心状态改变监听器 /// </summary> /// <param name="currentCore">角色当前的核心</param> public void CoreChangeLister(BaseCore currentCore) { m_CurrentBaseCore = currentCore; //当前不使用核心 if (m_CurrentBaseCore == null) { ChangeButtleDemagePercent(0.0f); } else { //当前使用核心 switch (m_CurrentBaseCore.Element) { //普通核心 case BaseCore.CoreElement.Primary: ChangeButtleDemagePercent(0.1f); break; //火焰核心 case BaseCore.CoreElement.Fire: ChangeButtleDemagePercent(0.1f); break; //冰冻核心 case BaseCore.CoreElement.Ice: ChangeButtleDemagePercent(0.2f); break; //紫水晶 case BaseCore.CoreElement.Amethyst: ChangeButtleDemagePercent(0.4f); break; } } }
public FilterController(BaseCore core, ISavedPodcastRepository podcastProvider, BaseStringCompressor stringCompressor) { _core = core; _podcastProvider = podcastProvider; _stringCompressor = stringCompressor; }
protected virtual void ShowMessage(BaseCore dataManager) { MsgHelpers.ShowInfo(this, dataManager.Message); Close(); MaintainData.RefreshList(); }