protected override sealed void AreaOneInstanceApplyEffectEnemyHook(StatusManager enemy_sm) { enemy_sm.ApplyInstanceMagicalDamageFix(damage * status_manager.spell_power, status_manager); if(Random.value <= stun_chance) { enemy_sm.ApplyStun(stun_duration); } }
protected override sealed void SkillApplyEffectEnemyHook(StatusManager enemy_sm) { if(enemy_sm.spell_block) { enemy_sm.UseSpellBlock(); } else { CastableSkillApplyEffectEnemyHook(enemy_sm); } }
public void ApplyEffectEnemy(StatusManager enemy_sm) { AudioManager.PlaySound(apply_enemy_effect_sound, enemy_sm.gameObject.transform.position); if(!enemy_sm.invulnerable) { SkillApplyEffectEnemyHook(enemy_sm); } else { enemy_sm.text_generator.ShowStatus("Invulnerable!"); } }
public CharacterEntity(Game mGame, int mX, int mY, int mZ, string mName, bool mHostile) : base(mGame, mX, mY, mZ, mName) { _statusManager = new StatusManager(); _inventoryManager = new InventoryManager(); behaviors = new List<Behavior>(); visibleThisTurn = new List<Entity>(); perceptionRange = 20; hostile = mHostile; Game.LogAdd("#" + UID + ": new 'CharacterEntity' named '" + Name + "' - (" + X + ";" + Y + ")", true); }
// Use this for initialization void Start () { _instance = this; tween = this.GetComponent<TweenPosition>(); playerStatus = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<PlayerStatus>(); gameObject.SetActive(false); UIEventListener.Get(attackaddbtn).onClick += onClickAddAttack; UIEventListener.Get(defaddbtn).onClick += onClickAddDef; UIEventListener.Get(speedaddbtn).onClick += onClickAddspeed; UIManager._instance.openCall += OnShowPanel; }
protected override sealed void BasicAttackApplyEffectEnemyHook(StatusManager enemy_sm) { //apply damage, possible critical bool crit = (Random.value <= status_manager.crit_chance && status_manager.crit_chance != 0f); float damage = crit ? (status_manager.attack_damage * status_manager.crit_damage) : (status_manager.attack_damage); enemy_sm.ApplyInstancePhysicalAttackDamageFix(damage, status_manager); enemy_sm.TempChangePhysicalDamagePerSecFix(status_manager.posion_damage, status_manager.posion_dur); enemy_sm.ApplySlowAttack(status_manager.posion_attack_slow, status_manager.posion_dur); enemy_sm.ApplySlowMove(status_manager.posion_move_slow, status_manager.posion_dur); if(Random.value <= status_manager.stun_chance && status_manager.stun_chance != 0f) { enemy_sm.ApplyStun(status_manager.stun_dur); } }
protected override sealed void SkillApplyEffectEnemyHook(StatusManager enemy_sm) { if((Random.value <= enemy_sm.dodge_chance) && (enemy_sm.dodge_chance >= 0.005f)) { enemy_sm.text_generator.ShowStatus("Dodged"); } else { BasicAttackApplyEffectEnemyHook(enemy_sm); foreach(EffectApplier s in status_manager.basic_attack_passives.Keys) { for(int i = status_manager.basic_attack_passives[s]; i > 0; ++i) { s.ApplyEffectEnemy(enemy_sm); } } } }
private void Start() { theStatusMgr = FindObjectOfType <StatusManager>(); theScoreMgr = FindObjectOfType <ScoreManager>(); }
// Use this for initialization void Start() { //すべてクリアする。 NovelSingleton.clearSingleton(); StatusManager.initScene(); Debug.Log("GameStart"); //ドキュメント作製用 //DocGenerator.start (); //return; //NovelSingleton.clearSingleton (); this.gameManager = NovelSingleton.GameManager; this.gameView = NovelSingleton.GameView; this.gameManager.setScene(this); //シナリオの読み込み this.gameManager.loadConfig(); //font タグを使って指定だな。 //メッセージフォントカラー設定 this.gameView.messageArea.GetComponent <GUIText> ().guiText.color = ColorX.HexToRGB(this.gameManager.getConfig("messageFontColor")); this.gameView.messageArea.GetComponent <GUIText> ().guiText.fontSize = int.Parse(this.gameManager.getConfig("messageFontSize")); //グローバルコンフィグ読み込み this.gameManager.saveManager.loadGlobal(); if (StatusManager.nextLoad != "") { string next_load = StatusManager.nextLoad; //ロードの場合、画面を再現する必要がある。 StatusManager.nextLoad = ""; this.gameManager.loadData(next_load); } else if (StatusManager.nextFileName != "") { //scene new でジャンプしてきた後。variable は引き継がないとだめ。 string file = StatusManager.nextFileName; string target = StatusManager.nextTargetName; StatusManager.nextFileName = ""; StatusManager.nextTargetName = ""; //この2つを元にその位置へジャンプした上で実行 string tag_str = "[jump file='" + file + "' target='" + target + "' ]"; //タグを実行 AbstractComponent cmp = this.gameManager.parser.makeTag(tag_str); cmp.start(); } else { //初回起動時 this.messageSpeed = float.Parse(this.gameManager.getConfig("messageSpeed")); StatusManager.variable.replaceAll("global", this.gameManager.globalSetting.globalVar); string scenario_file = this.gameManager.getConfig("first_scenario"); this.gameManager.loadScenario(scenario_file); this.gameManager.nextOrder(); } }
protected abstract void AreaOneInstanceApplyEffectEnemyHook(StatusManager enemy_sm);
//apply all effects to the unit that was hit... unless its dead public void HitUnit(StatusManager unitHit) { if (unitHit._localBlackboard.dead) //don't want error messages popping up from beating a dead unit { return; } if (_spawn != null) { if (_spawn.spawnOnLandAttack) { _spawn.SpawnSomething(); } } if (_doDamage != null) { if (_typeInflictor != null && _localBlackboard._statusManager._typeInfuser == null) { Debug.LogError(gameObject.name + " has a type inflicting attack but is missing the type infuser component.\nAdd one or this unit's attacks won't work"); return; } //if this attack has a type, check if it matches the hit unit's type. If so multiply damage by the typeDamageMultiplier if (_typeInflictor != null && _typeInflictor.CompareTypes(_localBlackboard._statusManager._typeInfuser.attackType, unitHit.FindType())) { _doDamage.DealDamage(unitHit, _localBlackboard, GlobalBlackboard.Instance.typeDamageMultiplier); } else { _doDamage.DealDamage(unitHit, _localBlackboard); } } if (_heal != null) { _heal.HealUnit(unitHit, _localBlackboard); } //Apply Push back effect if one is added if (_pushInflictor != null) { _pushInflictor.ApplyPushBack(unitHit._localBlackboard.navAI, _localBlackboard.transform.position); } if (_stunInflictor != null) { _stunInflictor.InflictStun(unitHit); } //just used for projectiles. Starts a countdown to kill this attack object if (_destroyAfterTime != null) { _destroyAfterTime.StartDestroyCountdown(this.gameObject); } if (_destroyOnHit != null) { if (_destroyOnHit.killUnit) { _destroyOnHit.DestroyAttack(_localBlackboard.gameObject); } else { _destroyOnHit.DestroyAttack(this.gameObject); } } }
// Start is called before the first frame update void Start() { statusManager = statusObj.GetComponent <StatusManager>(); material = GetComponent <Image>().material; gage = 0; }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { #region Discount gRPC client // Enable support for unencrypted HTTP2 //AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true); //AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2Support", true); Random jitterer = new Random(); var loggerFactory = LoggerFactory.Create(logging => { logging.AddConsole(); logging.SetMinimumLevel(LogLevel.Debug); }); var serverErrors = new HttpStatusCode[] { HttpStatusCode.BadGateway, HttpStatusCode.GatewayTimeout, HttpStatusCode.ServiceUnavailable, HttpStatusCode.InternalServerError, HttpStatusCode.TooManyRequests, HttpStatusCode.RequestTimeout }; var gRpcErrors = new StatusCode[] { StatusCode.DeadlineExceeded, StatusCode.Internal, StatusCode.NotFound, StatusCode.ResourceExhausted, StatusCode.Unavailable, StatusCode.Unknown }; Func <HttpRequestMessage, IAsyncPolicy <HttpResponseMessage> > retryFunc = (request) => { return(Policy.HandleResult <HttpResponseMessage>(r => { var grpcStatus = StatusManager.GetStatusCode(r); var httpStatusCode = r.StatusCode; return (grpcStatus == null && serverErrors.Contains(httpStatusCode)) || // if the server send an error before gRPC pipeline (httpStatusCode == HttpStatusCode.OK && gRpcErrors.Contains(grpcStatus.Value)); // if gRPC pipeline handled the request (gRPC always answers OK) }) .WaitAndRetryAsync(3, (input) => TimeSpan.FromSeconds(3 + input), (result, timeSpan, retryCount, context) => { var grpcStatus = StatusManager.GetStatusCode(result.Result); Console.WriteLine($"Request failed with {grpcStatus}. Retry"); })); }; services.AddGrpcClient <DiscountProtoService.DiscountProtoServiceClient>(options => { options.Address = new Uri(Configuration["GrpcSettings:DiscountUrl"]); options.ChannelOptionsActions.Add(channelOptions => { channelOptions.Credentials = ChannelCredentials.Insecure; }); }).AddPolicyHandler(retryFunc); services.AddScoped <DiscountGrpcService>(); #endregion #region Redis connection configuration services.AddStackExchangeRedisCache(options => { options.Configuration = Configuration.GetValue <string>("CacheSettings:ConnectionString"); }); #endregion services.AddControllers(); services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo { Title = "Basket.API", Version = "v1" }); }); #region Data repositories registration services.AddScoped <IBasketRepository, BasketRepository>(); #endregion }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StatusManager").GetComponent <StatusManager>(); }
protected override sealed void CastableSkillApplyEffectEnemyHook(StatusManager enemy_sm) { AreaSelectionSkillApplyEffectEnemyHook(enemy_sm); }
protected abstract void AreaSelectionSkillApplyEffectEnemyHook(StatusManager enemy_sm);
/// <summary> /// Returns a valid project Status. /// </summary> /// <param name="p">A Project</param> /// <returns>Random Status</returns> public Status GetStatus() { List <Status> Statuses = StatusManager.GetByProjectId(p.Id); return(Statuses[rng.Next(0, Statuses.Count)]); }
public bool ReloadEpgData(EpgViewPeriod newPeriod = null, bool noMsg = false) { try { newPeriod = newPeriod ?? DefPeriod.DefPeriod; if (Period.Equals(newPeriod) == true && IsEpgLoaded == true) { return(true); } if (CommonManager.Instance.WaitingSrvReady == true) { StatusManager.StatusNotifySet("EpgTimerSrv準備完了待ち"); return(false); } if (CommonManager.Instance.IsConnected == false) { return(false); } ErrCode err; var serviceDic = new Dictionary <UInt64, EpgServiceAllEventInfo>(); if (EpgTabInfo.SearchMode == false) { err = CommonManager.Instance.DB.LoadEpgData(ref serviceDic, newPeriod, EpgTabInfo.ViewServiceList); } else { //番組情報の検索 err = CommonManager.Instance.DB.SearchPgLists(EpgTabInfo.GetSearchKeyReloadEpg().IntoList(), ref serviceDic, newPeriod); } if ((noMsg && err != ErrCode.CMD_SUCCESS) || CommonManager.CmdErrMsgTypical(err, "EPGデータの取得", err == ErrCode.CMD_ERR_BUSY ? "EPGデータの読み込みを行える状態ではありません。\r\n(EPGデータ読み込み中など)" : "エラーが発生しました。\r\nEPGデータが読み込まれていない可能性があります。") == false) { return(false); } //並び順はViewServiceListによる。eventListはこの後すぐ作り直すのでとりあえずそのままもらう。 ServiceEventList = CommonManager.Instance.DB.ExpandSpecialKey(EpgTabInfo.ViewServiceList, serviceDic.Values.Select(info => info.serviceInfo)) .Where(id => serviceDic.ContainsKey(id)).Select(id => serviceDic[id]) .Select(info => new EpgServiceEventInfo { serviceInfo = info.serviceInfo, eventList = info.eventMergeList.ToList() }).ToList(); EventUIDList = new Dictionary <ulong, EpgEventInfo>(); EventFilteredHash = new HashSet <ulong>(); var viewContentMatchingHash = new HashSet <UInt32>(EpgTabInfo.ViewContentList.Select(d => d.MatchingKeyList).SelectMany(x => x)); foreach (EpgServiceEventInfo item in ServiceEventList) { item.eventList = item.eventList.FindAll(eventInfo => { //開始時間未定を除外 bool ret = (eventInfo.StartTimeFlag != 0) //自動登録されたりするので、サービス別番組表では表示させる //&& (eventInfo.IsGroupMainEvent == true) //表示抑制 && (eventInfo.IsOver(newPeriod.Start) == false && eventInfo.PgStartTime < newPeriod.End); if (ret == false) { return(false); } //ジャンル絞り込み bool filtered = !ViewUtil.ContainsContent(eventInfo, viewContentMatchingHash, EpgTabInfo.ViewNotContentFlag); if (EpgTabInfo.HighlightContentKind && filtered) { EventFilteredHash.Add(eventInfo.CurrentPgUID()); } return(EpgTabInfo.HighlightContentKind || !filtered); }); item.eventList.ForEach(data => EventUIDList[data.CurrentPgUID()] = data); } IsEpgLoaded = true; Period = newPeriod.DeepClone(); IsDefPeriod = Period.Equals(DefPeriod.DefPeriod); return(true); } catch (Exception ex) { CommonUtil.DispatcherMsgBoxShow(ex.ToString()); } return(false); }
[Test] public void TestStatusManager() { //add item this.persistBroker.Execute(String.Format("delete from tblreworksheet where reworkcode ='{0}'", reworkCode)); this.persistBroker.Execute(String.Format("delete from tblreworksource where reworkscode = '{0}'", sourceCode)); this.persistBroker.Execute(String.Format("delete from tblitem where itemcode = '{0}'", itemCode)); Item item = this.itemFacade.CreateNewItem(); item.ItemCode = itemCode; item.ItemUOM = "lot"; item.ItemType = "lot"; item.ItemControlType = "No control"; item.ItemUser = "******"; item.ItemDate = FormatHelper.TODateInt(DateTime.Today.ToShortDateString()); item.MaintainUser = "******"; item.ItemDescription = "test add"; this.itemFacade.AddItem(item); Assert.AreEqual(itemFacade.QueryItemCount(itemCode, string.Empty, string.Empty, string.Empty, string.Empty), 1); //add sourceitemoce ReworkSource reworkSource = this.reworkFacade.CreateNewReworkSource(); reworkSource.ReworkSourceCode = sourceCode; reworkSource.MaintainUser = "******"; reworkSource.Description = "this is for test!"; this.reworkFacade.AddReworkSource(reworkSource); Assert.AreEqual(reworkFacade.QueryReworkSourceCount(sourceCode), 1); //add reworksheet ReworkSheet reworkSheet = this.reworkFacade.CreateNewReworkSheet(); reworkSheet.ItemCode = itemCode; reworkSheet.ReworkCode = reworkCode; reworkSheet.CreateDate = FormatHelper.TODateInt(DateTime.Today.ToShortDateString()); reworkSheet.CreateTime = FormatHelper.TOTimeInt(DateTime.Now.ToLongTimeString()); reworkSheet.CreateUser = "******"; reworkSheet.Department = "rd department"; reworkSheet.MaintainUser = "******"; reworkSheet.MOCode = "MOCode"; reworkSheet.NewMOCode = "New MOCode"; reworkSheet.NewMOType = "NewMOType"; reworkSheet.ReworkCode = "ReworkCode"; reworkSheet.ReworkContent = "ReworkContent"; reworkSheet.ReworkDate = FormatHelper.TODateInt(DateTime.Today.ToShortDateString()); reworkSheet.ReworkHC = 0; reworkSheet.ReworkMaxQty = 10; reworkSheet.ReworkQty = 1; reworkSheet.ReworkRealQty = 1; reworkSheet.ReworkSourceCode = sourceCode; reworkSheet.ReworkTime = FormatHelper.TOTimeInt(DateTime.Now.ToLongTimeString()); reworkSheet.ReworkType = "rework Type"; reworkSheet.Status = ReworkFacade.REWORKSTATUS_NEW; this.reworkFacade.AddReworkSheet(reworkSheet); Assert.AreEqual(this.reworkFacade.QueryReworkSheetCount(reworkSheet.ReworkCode), 1); StatusManager statusManager = new StatusManager(this.reworkFacade, reworkSheet); statusManager.Waiting(); ReworkSheet currentReworkSheet = (ReworkSheet)this.reworkFacade.GetReworkSheet(reworkSheet.ReworkCode); Assert.AreEqual(currentReworkSheet.Status, ReworkFacade.REWORKSTATUS_WAITING); statusManager.NOApprove(); ReworkSheet currentReworkSheet1 = (ReworkSheet)this.reworkFacade.GetReworkSheet(reworkSheet.ReworkCode); Assert.AreEqual(currentReworkSheet1.Status, ReworkFacade.REWORKSTATUS_NEW); statusManager.Waiting(); ReworkSheet currentReworkSheet2 = (ReworkSheet)this.reworkFacade.GetReworkSheet(reworkSheet.ReworkCode); Assert.AreEqual(currentReworkSheet2.Status, ReworkFacade.REWORKSTATUS_WAITING); statusManager.Approve(); ReworkSheet currentReworkSheet3 = (ReworkSheet)this.reworkFacade.GetReworkSheet(reworkSheet.ReworkCode); Assert.AreEqual(currentReworkSheet3.Status, ReworkFacade.REWORKSTATUS_OPEN); }
public BusinessManager(DataAccess dataAccess, EventLoggerAccess logger) { _StatusManager = new StatusManager(dataAccess, logger); _RequestManager = new RequestManager(dataAccess, _StatusManager, logger); }
//========================================================================== // Update is called once per frame void Update() { if (Input.anyKeyDown) { foreach (KeyCode key in System.Enum.GetValues(typeof(KeyCode))) { if (Input.GetKeyDown(key)) { this.keys.Add(key); } } } //======================================================================= // If cheat codes are enabled, use these codes if (this.keys.Count >= 5 && cheatCodesEnabled) { // load next scene if (getCode(KeyCode.G, KeyCode.N, KeyCode.E, KeyCode.X, KeyCode.T)) { loadNextScene(); this.keys.Add(KeyCode.Colon); print("Loading next scene"); } // load previous scene if (getCode(KeyCode.G, KeyCode.P, KeyCode.R, KeyCode.E, KeyCode.V)) { loadPrevScene(); this.keys.Add(KeyCode.Colon); print("Loading previous scene"); } // reset the level if (getCode(KeyCode.R, KeyCode.E, KeyCode.S, KeyCode.E, KeyCode.T)) { this.keys.Add(KeyCode.Colon); print("Loading previous scene"); SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex); } // god mode if (getCode(KeyCode.I, KeyCode.D, KeyCode.D, KeyCode.Q, KeyCode.D)) { this.godMode = !this.godMode; this.keys.Add(KeyCode.Colon); print("God Mode Enabled"); } // souls mode if (getCode(KeyCode.S, KeyCode.O, KeyCode.U, KeyCode.L, KeyCode.S)) { this.soulsMode = !this.soulsMode; if (this.soulsMode) { StatusManager.getInstance().fear = 0.0f; } this.keys.Add(KeyCode.Colon); print("Souls mode enabled"); } if (getCode(KeyCode.L, KeyCode.O, KeyCode.W, KeyCode.H, KeyCode.P)) { StatusManager.getInstance().health = 10; } if (getCode(KeyCode.M, KeyCode.A, KeyCode.X, KeyCode.H, KeyCode.P)) { StatusManager.getInstance().health = 100; } if (getCode(KeyCode.T, KeyCode.O, KeyCode.K, KeyCode.E, KeyCode.N)) { moveTokens(); } if (getCode(KeyCode.S, KeyCode.P, KeyCode.E, KeyCode.E, KeyCode.D)) { thePlayer.movementSpeed *= 2; //SoundManager.getInstance().playEffect("notSonicTheHedgehog"); (thePlayer as Girl).animator.speed *= 2; this.keys.Clear(); } updateStatus(); //----------------------------------------------------------------------- // removes the first element of the keys array for (int ix = this.keys.Count; ix > 5; ix--) { this.keys.RemoveAt(0); } } //======================================================================= // If debug/developer keys are enabled, do these debug keys. These are // quick alternatives to cheat codes. if (debugKeysEnabled) { //----------------------------------------------------------------------- // Load next scene or previous scene if (Input.GetKeyDown(KeyCode.PageUp)) { loadNextScene(); } else if (Input.GetKeyDown(KeyCode.PageDown)) { loadPrevScene(); } //----------------------------------------------------------------------- // Bring animals back to kira if (Input.GetKeyDown(KeyCode.Insert)) { Player[] playerUnits = PlayerManager.getInstance().players; for (int ix = 0; ix < playerUnits.Length; ix++) { if (!(playerUnits[ix] is Girl)) { playerUnits[ix].transform.position = thePlayer.transform.position; } } } //----------------------------------------------------------------------- // Kill all active enemies if (Input.GetKeyDown(KeyCode.Delete)) { EnemyManager.getInstance().killAllEnemies(); } //----------------------------------------------------------------------- // Return to beginning of level if (Input.GetKeyDown(KeyCode.Home)) { Player[] playerUnits = PlayerManager.getInstance().players; for (int ix = 0; ix < playerUnits.Length; ix++) { playerUnits[ix].transform.position = this.worldSpawn; } } //----------------------------------------------------------------------- // Set Kira's health to 0 if (Input.GetKeyDown(KeyCode.End)) { StatusManager.getInstance().health = 0; } //----------------------------------------------------------------------- // IDDQD if (Input.GetKeyDown(KeyCode.Equals)) { this.godMode = !this.godMode; } } }
public bool CheckHasStatus(GameObject target, GameObject source) { bool result = false; result = compareAgainstTarget == true?StatusManager.CheckForStatus(target, hasStatusType) : StatusManager.CheckForStatus(source, hasStatusType); return(result); }
protected override sealed void SingleTargetShootApplyEffectEnemyHook(StatusManager enemy_sm) { enemy_sm.ApplyInstanceMagicalDamageFix(damage * status_manager.spell_power, status_manager); }
public Status_Idle(GameObject rootGO, StatusManager statusManager, Animator anim) : base(rootGO, statusManager, anim) { statusName = "Idle"; }
// Use this for initialization void Start () { status = GetComponent<StatusManager>(); StartCoroutine(MinigameCoroutine()); }
public async Task SetUnregistered(IEnumerable <Guid> idsToUpdate, Guid identityWorkId, params object[] parameters) { var statusManager = new StatusManager <T>(Validator); await statusManager.SetUnregistered(idsToUpdate, identityWorkId, parameters); }
protected abstract void MultiTargetShootApplyEffectEnemyHook(StatusManager enemy_sm);
// Use this for initialization void Start() { basic = false; if (playerDisplay != null) { if (PlayerNum == 1) { playerDisplay = GameObject.Find("PlayerImage").GetComponent <Image> (); } else { playerDisplay = GameObject.Find("PlayerImage_2").GetComponent <Image> (); } } hit = false; if (GameObject.Find("CharSelect") != null) { if (PlayerNum == 1) { weapon = GameObject.Find("CharSelect").GetComponent <CharSelect> ().p1; } else { weapon = GameObject.Find("CharSelect").GetComponent <CharSelect> ().p2; } } myStatus = GetComponent <StatusManager>(); if (PlayerNum == 1) { if (GameObject.FindGameObjectWithTag("Player2") != null && PlayerNum == 1) { atkbutton = "Fire_P1"; } else { atkbutton = "Fire_Solo"; } } else { atkbutton = "Fire_P2"; } if (PlayerNum == 1) { currentBullet = GameObject.Find("Current Bullet").GetComponent <Text>(); } else { currentBullet = GameObject.Find("Current Bullet_P2").GetComponent <Text>(); } if (PlayerNum == 1) { pHealth = GameObject.Find("PlayerHealth").GetComponent <Text>(); } else { pHealth = GameObject.Find("PlayerHealth_2").GetComponent <Text>(); } bulletIndicators = new GameObject[8]; if (PlayerNum == 1) { bulletIndicators [0] = GameObject.Find("Player 1 Bottle 1"); bulletIndicators [1] = GameObject.Find("Player 1 Bottle 2"); bulletIndicators [2] = GameObject.Find("Player 1 Bottle 3"); bulletIndicators [3] = GameObject.Find("Player 1 Bottle 4"); bulletIndicators [4] = GameObject.Find("Player 1 Bottle 5"); bulletIndicators [5] = GameObject.Find("Player 1 Bottle 6"); bulletIndicators [6] = GameObject.Find("Player 1 Bottle 7"); bulletIndicators [7] = GameObject.Find("Player 1 Bottle 8"); } else { bulletIndicators [0] = GameObject.Find("Player 2 Bottle 1"); bulletIndicators [1] = GameObject.Find("Player 2 Bottle 2"); bulletIndicators [2] = GameObject.Find("Player 2 Bottle 3"); bulletIndicators [3] = GameObject.Find("Player 2 Bottle 4"); bulletIndicators [4] = GameObject.Find("Player 2 Bottle 5"); bulletIndicators [5] = GameObject.Find("Player 2 Bottle 6"); bulletIndicators [6] = GameObject.Find("Player 2 Bottle 7"); bulletIndicators [7] = GameObject.Find("Player 2 Bottle 8"); } GameObject p2 = GameObject.FindGameObjectWithTag("Player2"); if (p2 != null || PlayerNum != 1) { field = GameObject.FindGameObjectWithTag("FieldManager").GetComponent <FieldManagerPVP> (); } else { field = GameObject.FindGameObjectWithTag("FieldManager").GetComponent <FieldManager> (); } reload = true; health = 100; }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StatusManager").GetComponent <StatusManager>(); text = new GameObject[sm.dummyNum]; GenerateDummyDebugger(sm.dummyNum); }
private void setReminder(int leadID, CRM.Data.Entities.LeadPolicy policy, int masterStatusID) { int lastStatusID = 0; double duration = 0; LeadTask task = null; DateTime reminderDate = DateTime.MaxValue; string sdate = null; // return if no change in status int.TryParse(hf_lastStatusID.Value, out lastStatusID); if (lastStatusID == masterStatusID) { return; } // get status with reminder duration StatusMaster statusMaster = StatusManager.GetStatusId(masterStatusID); // return if master status not loaded properly if (statusMaster == null) { return; } // get task associated with policy task = TasksManager.GetPolicyReminderTask(leadID, policy.Id); // master status has no reminder if (statusMaster.ReminderMaster == null) { // delete existing reminder if (task != null) { TasksManager.Delete(task.id); } } else { if (task == null) { // create new reminder as task task = new LeadTask(); task.lead_id = leadID; task.lead_policy_id = policy.Id; task.policy_type = policy.PolicyType; } if (SessionHelper.getClientId() > 0) { task.creator_id = SessionHelper.getClientId(); } // update existing reminder task.master_status_id = masterStatusID; sdate = DateTime.Now.ToShortDateString() + " 5:00:00 AM"; DateTime.TryParse(sdate, out reminderDate); // get duration from status reminder if (statusMaster.ReminderMaster != null) { duration = (double)(statusMaster.ReminderMaster.Duration ?? 0); } if ((int)statusMaster.ReminderMaster.DurationType == 1) { task.start_date = reminderDate.AddHours(duration); } else { task.start_date = reminderDate.AddDays(duration); } task.end_date = task.start_date; task.status_id = 1; task.text = "Alert"; task.isAllDay = true; task.details = statusMaster.StatusName; // +"<div>Ins. Co: " + policy.InsuranceCompanyName + "</div><div>Pol: " + policy.PolicyNumber + "</div>"; task.owner_id = SessionHelper.getUserId(); TasksManager.Save(task); } // refresh tasks on parent page if (statusChanged != null) { statusChanged(this, null); } }
//制御するクラスへの参照 ステータス画面、戦闘マップ画面の基本的にどちらか片方しか存在しない public void Init(StatusManager statusManager, BattleMapManager battleMapManager) { this.statusManager = statusManager; this.battleMapManager = battleMapManager; }
public void bindData() { // main binding routine List <StatusMaster> statusMasters = null; List <SubStatusMaster> subStatusMasters = null; List <StateMaster> states = null; IQueryable <AdjusterMaster> adjusters = null; int clientID = SessionHelper.getClientId(); int leadID = Convert.ToInt32(Session["LeadIds"]); // bind states states = State.GetAll(); //CollectionManager.FillCollection(ddlState, "StateId", "StateName", CarrierManager.GetCarriers(clientID)); var state = CarrierManager.GetCarriers(clientID); ddlState.DataSource = state.ToList(); ddlState.DataValueField = "StateId"; ddlState.DataTextField = "StateName"; ddlState.DataBind(); ddlState.Items.Insert(0, new ListItem("--- Select ---", "0")); if (clientID > 0) { adjusters = AdjusterManager.GetAll(clientID); statusMasters = StatusManager.GetAll(clientID); subStatusMasters = SubStatusManager.GetAll(clientID); } else { adjusters = AdjusterManager.GetAll(); statusMasters = StatusManager.GetAll(); subStatusMasters = SubStatusManager.GetAll(); } //CollectionManager.FillCollection(ddlCarrier, "CarrierId", "CarrierName", CarrierManager.GetCarriers(clientID)); var carrier = CarrierManager.GetCarriers(clientID); ddlCarrier.DataSource = state.ToList(); ddlCarrier.DataValueField = "CarrierId"; ddlCarrier.DataTextField = "CarrierName"; ddlCarrier.DataBind(); ddlCarrier.Items.Insert(0, new ListItem("--- Select ---", "0")); bindAgents(); if (this.policyID > 0) { // edit existing policy tabPanelAgent.Visible = true; tabPanelPolicyNotes.Visible = true; fillForm(); //bindDocuments(leadID); //bindContacts(); bindLienHolders(); //fillComments(leadID); bindLimits(); bindSubLimits(); bindClaims(); activateLinks(); tabPanelLienHolder.Visible = true; ShowAddCoverage(); SetAddCoverage(this.policyID); } else { // create blank one tabPanelAgent.Visible = false; tabPanelPolicyNotes.Visible = false; bindLimits(); // create blank one bindSubLimits(); tabPanelLienHolder.Visible = false; hf_policyID.Value = "0"; hf_lastStatusID.Value = "0"; clearFields(); HideAddCoverage(); ShowAddCoverageAdd(); } }
protected override sealed void AreaSelectionSkillApplyEffectEnemyHook(StatusManager enemy_sm) { AreaOneInstanceApplyEffectEnemyHook(enemy_sm); }
public void DealDamage(StatusManager unitHit, LocalBlackboard _localBlackboard, float damageMultiplier = 1) { damageToDeal = damageAmount * damageMultiplier; unitHit.TakeDamage(damageToDeal, _localBlackboard); }
// triggered when the component is reset private void Reset() { this.stats = GetComponent <StatusManager>(); this.rb = GetComponent <Rigidbody>(); }
// Start is called before the first frame update void Start() { sm = GameObject.Find("StatusManager").GetComponent <StatusManager>(); dummies = new GameObject[sm.dummyNum]; GenerateDummyCursor(sm.dummyNum); }
// Use this for initialization void Start() { manager = FindObjectOfType <StatusManager>(); }
protected abstract void SkillApplyEffectEnemyHook(StatusManager enemy_sm);
private void CreateStatusManager() { _statusManager = new StatusManager(this); }
public virtual void SetUpHook(StatusManager sm) { }
//初期化メソッド unitはユニット手持ちのアイテム一覧などを表示する時に使用 public void Init(Item item, StatusManager statusManager, Unit unit, int index) { this.statusManager = statusManager; this.unit = unit; this.item = item; this.index = index; icon.gameObject.SetActive(true); if (item.ItemType == ItemType.WEAPON) { Weapon weapon = item.weapon; //配下の名前、回数、値段を設定 itemNameText.text = weapon.name; enduranceText.text = string.Format("{0}/{1}", weapon.endurance.ToString(), weapon.maxEndurance.ToString()); //200825 武器の種類によってアイコンを読み込む if (weapon.type == WeaponType.SHOT) { icon.sprite = iconList[0]; } else if (weapon.type == WeaponType.LASER) { icon.sprite = iconList[1]; } else if (weapon.type == WeaponType.STRIKE) { icon.sprite = iconList[2]; } else if (weapon.type == WeaponType.HEAL) { icon.sprite = iconList[3]; } //隙間に入れた場合、Unitはnullで初期化されているのでグレーアウトは発生しない if (unit != null) { //装備出来るかどうか確認して出来ない場合はグレーアウト if (WeaponEquipWarn.NONE != WeaponEquipWarnUtil.GetWeaponEquipWarn(weapon, unit)) { isEquipable = false; itemNameText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); enduranceText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); } else { isEquipable = true; } } } else if (item.ItemType == ItemType.POTION) { Potion potion = item.potion; itemNameText.text = potion.name; enduranceText.text = string.Format("{0}/{1}", potion.useCount.ToString(), potion.maxUseCount.ToString()); //ステータスアップアイテムは使用可能だが、それ以外は文字をグレーアウトさせる if (potion.potionType != PotionType.STATUSUP) { //文字を灰色に itemNameText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); enduranceText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); } icon.sprite = iconList[4]; } else if (item.ItemType == ItemType.ACCESSORY) { Accessory accessory = item.accessory; itemNameText.text = accessory.name; //耐久は無いので非表示に enduranceText.enabled = false; icon.sprite = iconList[8]; } else if (item.ItemType == ItemType.TOOL) { Tool tool = item.tool; itemNameText.text = tool.name; //金塊 if (tool.name == "金塊" || tool.name == "大きな金塊" || tool.name == "巨大な金塊") { enduranceText.text = ""; icon.sprite = iconList[6]; //文字を灰色に itemNameText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); enduranceText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); } else if (tool.isClassChangeItem) { enduranceText.text = "1/1"; icon.sprite = iconList[7]; //これはステータス画面で使用可能 } else { //これは鍵など enduranceText.text = "1/1"; icon.sprite = iconList[5]; //鍵などはステータス画面では使えないので文字を灰色に itemNameText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); enduranceText.color = new Color(170 / 255f, 170 / 255f, 170 / 255f); } } //装備しているアイテムならマークを表示 if (item.isEquip) { equipMark.SetActive(true); } else { equipMark.SetActive(false); } }
//========================================================================== // heals the player void healPlayer() { StatusManager.getInstance().health += healSpeed * Time.deltaTime; StatusManager.getInstance().fear -= healSpeed * Time.deltaTime; }
protected abstract void BasicAttackApplyEffectEnemyHook(StatusManager enemy_sm);
protected void Awake() { // LOAD SETTINGS FROM NETWORK SETTINGS TEXT FILE string[] strLines = null; // FORCE THE CONFIGURATION FILE THROUGH NetworkSettingsFile = "NetworkSettings.txt"; if (NetworkSettingsFile != "") { if (!Util.FileExists("", NetworkSettingsFile)) { Status.Status = "Unable to find file \"" + NetworkSettingsFile + "\"."; } else { strLines = Util.ReadTextFile("", NetworkSettingsFile).Split('\n'); } if (strLines != null && strLines.Length > 0) { foreach (string st in strLines) { if (!st.StartsWith("//") && st.Trim() != "" && st.Contains("=")) { string[] s = st.Trim().Split('='); switch (s[0].Trim().ToLower()) { case "applicationmode": ServerMode = Util.ConvertToInt(s[1].Trim()); if (ServerMode < 1 || ServerMode > 4) { ServerMode = 1; } break; case "serverip": ServerIPaddress = s[1].Trim(); break; case "serverport": ServerPort = Util.ConvertToInt(s[1].Trim()); break; case "displayname": ServerName = s[1].Trim(); break; case "description": ServerDesc = s[1].Trim(); break; case "password": ServerPassword = s[1].Trim(); break; case "maxconnections": MaxConnections = Util.ConvertToInt(s[1].Trim()); break; } } } Status.Status = NetworkSettingsFile + " found. " + strLines.Length.ToString() + " lines Read In."; } } // INITIALIZE SINGLETON INSTANCES this.dontDestroyOnLoad = true; NetworkManager.singleton = GetInstance(); NetworkManager.singleton.networkAddress = this.ServerIPaddress; NetworkManager.singleton.serverBindAddress = this.ServerIPaddress; NetworkManager.singleton.networkPort = this.ServerPort; NetworkManager.singleton.maxConnections = this.MaxConnections; #if USES_APPLICATIONMANAGER _app = ApplicationManager.Instance; #endif #if USES_STATUSMANAGER _stm = StatusManager.Instance; #endif // SET THE NETWORKMANAGER AS READY FOR USE _blnIsReady = true; #if USES_STATUSMANAGER Status.UpdateStatus(); #endif _blnIsAwake = true; }
public static Caption CreateElement(XPathNavigator xmlNavigator) { string elmtName = xmlNavigator.Name; if (elmtName == "CAPTION" || elmtName == "STATIC") { Caption newCaption = new Caption(); newCaption.Load(xmlNavigator); return(newCaption); } else if (elmtName == "IMAGE" || elmtName == "TOPIMAGE" || elmtName == "MIDDLEIMAGE" || elmtName == "BOTTOMIMAGE") { Image newImage = new Image(); newImage.Load(xmlNavigator); return(newImage); } else if (elmtName == "COMBOBOX" || elmtName == "JCOMBOBOX") { ComboBox newComboBox = new ComboBox(); newComboBox.Load(xmlNavigator); return(newComboBox); } else if (elmtName == "BUTTON" || elmtName == "PREVBUTTON" || elmtName == "NEXTBUTTON" || elmtName == "PUSHBUTTON") { Button newButton = new Button(); newButton.Load(xmlNavigator); return(newButton); } else if (elmtName == "EDITBOX") { EditBox newEditBox = new EditBox(); newEditBox.Load(xmlNavigator); return(newEditBox); } else if (elmtName == "TABBEDPANE") { TabbedPane newTabbedPane = new TabbedPane(); newTabbedPane.Load(xmlNavigator); return(newTabbedPane); } else if (elmtName == "TAB") { Tab newTab = new Tab(); newTab.Load(xmlNavigator); return(newTab); } else if (elmtName == "TABBUTTON") { TabbedButton newTabbedButton = new TabbedButton(); newTabbedButton.Load(xmlNavigator); return(newTabbedButton); } else if (elmtName == "RADIOBUTTON") { RadioButton newRadioButton = new RadioButton(); newRadioButton.Load(xmlNavigator); return(newRadioButton); } else if (elmtName == "GUAGE") { Guage newGuage = new Guage(); newGuage.Load(xmlNavigator); return(newGuage); } else if (elmtName == "LISTBOX") { ListBox newListBox = new ListBox(); newListBox.Load(xmlNavigator); return(newListBox); } else if (elmtName == "SCROLLBAR") { ScrollBar newScrollBar = new ScrollBar(); newScrollBar.Load(xmlNavigator); return(newScrollBar); } else if (elmtName == "SCROLLBOX") { ScrollBox newScrollBox = new ScrollBox(); newScrollBox.Load(xmlNavigator); return(newScrollBox); } else if (elmtName == "CHECKBOX") { CheckBox newCheckBox = new CheckBox(); newCheckBox.Load(xmlNavigator); return(newCheckBox); } else if (elmtName == "JLISTBOX") { JListBox newJListBox = new JListBox(); newJListBox.Load(xmlNavigator); return(newJListBox); } else if (elmtName == "ZLISTBOX") { ZListBox newZListBox = new ZListBox(); newZListBox.Load(xmlNavigator); return(newZListBox); } else if (elmtName == "PANE") { Pane newPane = new Pane(); newPane.Load(xmlNavigator); return(newPane); } else if (elmtName == "TABLE") { Table newTable = new Table(); newTable.Load(xmlNavigator); return(newTable); } else { StatusManager.AddLog("Unknow element in xml : " + elmtName); return(null); } }
// Use this for initialization void Start() { Active = false; manager = FindObjectOfType <StatusManager>(); }
public void SetUp(StatusManager sm) { ownership = Ownership.player; status_manager = sm; if(usable) { StartCoroutine(ResetCoolDown()); } status_manager.ChangeMaxHealth(max_health); status_manager.ChangeMaxMana(max_mana); status_manager.ChangeHealthRegen(health_regen); status_manager.ChangeManaRegen(mana_regen); move_speed_amount = status_manager.move_speed * move_speed; status_manager.move_speed += move_speed_amount; dodge_speed_amount = status_manager.dodge_speed * dodge_speed; status_manager.dodge_speed += dodge_speed_amount; attack_speed_amount = status_manager.attack_speed * attack_speed; status_manager.attack_speed += attack_speed_amount; status_manager.ChangeDodgeChance(dodge_chance); status_manager.ChangeAttackDamage(attack_damage); status_manager.ChangeSpellPower(spell_power); status_manager.ChangeLifeSteal(life_steal); status_manager.ChangeSpellSteal(spell_steal); status_manager.ChangeManaSteal(mana_steal); status_manager.ChangeCritChance(crit_chance); status_manager.ChangeCritDamage(crit_damage); status_manager.heal_emp += heal_emp; status_manager.damage_emp += damage_emp; status_manager.ChangeBlockDamage(block_damage); status_manager.ChangePhysicalResist(physics_resist); status_manager.ChangeMagicalResist(magic_resist); status_manager.ChangeTenacity(tenacity); status_manager.ChangeCDR(cdr); status_manager.ChangeStunChance(stun_chance); status_manager.ChangeStunDur(stun_dur); SetUpHook(sm); }
public ProcessDataGenerator(ConcurrentQueue <DataAtom> _queue, StatusManager status) { this._queue = _queue; _statusManager = status; }
protected override void SkillApplyEffectEnemyHook(StatusManager enemy_sm) { }
protected override sealed void CastableSkillApplyEffectEnemyHook(StatusManager enemy_sm) { MultiTargetShootApplyEffectEnemyHook(enemy_sm); }
//called with the skill is assigned to a new character public void SetUp(StatusManager sm) { status_manager = sm; SkillSetUpHook(); if(ownership != Ownership.player) { ready = true; } else { StartCoroutine(ResetCoolDown()); } }
protected override sealed void SingleTargetShootApplyEffectEnemyHook(StatusManager enemy_sm) { enemy_sm.ApplyInstanceMagicalDamageFix(damage * status_manager.spell_power, status_manager); enemy_sm.ApplySlowMove(slow_percent, slow_duration); enemy_sm.ApplySlowAttack(slow_percent, slow_duration); }