void ShowSoul(Soul data) { if (data.m_config.type == (int)ItemType.Monster_Frage) { MonsterData mon = Core.Data.monManager.getMonsterByNum(data.m_config.updateId); m_txtName.text = data.m_config.name; AtlasMgr.mInstance.SetHeadSprite(m_spIcon, mon.ID.ToString()); m_spBg.spriteName = "star6"; m_star.SetStar(mon.star); m_spAttr.spriteName = "bag-0003"; } else if (data.m_config.type == (int)ItemType.Equip_Frage) { EquipData equip = Core.Data.EquipManager.getEquipConfig(data.m_config.updateId); if (equip != null) { m_txtName.text = data.m_config.name; m_spIcon.atlas = AtlasMgr.mInstance.equipAtlas; m_spIcon.spriteName = data.m_config.updateId.ToString(); m_spBg.spriteName = "star6"; m_star.SetStar(equip.star); m_spAttr.spriteName = "sui"; } } m_spAttr.MakePixelPerfect(); m_txtLvl.text = ""; RED.SetActive(true, m_spAttr.gameObject); }
public NPCViewModel(Soul soul) { Details = soul; SpawnCmd = new RelayCommand(async() => await CommandBuilder.SpawnNpc(Details.Id.ToString()).ExecuteAsync()); ToggleFavoriteCmd = new RelayCommand(() => IsFavorite = !IsFavorite); }
void OnGUI() { GUIStyle s = GUI.skin.GetStyle("Label"); s.alignment = TextAnchor.UpperCenter; if (GM.PlayerMan.CurrentMove == PlayerManager.Move.CREATE_SOUL && ActiveTile && ActiveTile.IsValid()) { Vector3 p = Camera.main.WorldToScreenPoint(ActiveTile.transform.position); if (!ActiveTile.Resident) { GUI.Label(new Rect(p.x - 15, Screen.height - p.y - 10, 30, 20), newSoulCount.ToString(), s); } else { Soul sr = ActiveTile.Resident.GetComponent("Soul") as Soul; GUI.Label(new Rect(p.x - 15, Screen.height - p.y - 10, 30, 20), Mathf.Min(newSoulCount, sr.max_souls - sr.Souls).ToString(), s); } } if (transferToUnit) { Vector3 p = Camera.main.WorldToScreenPoint(transferToUnit.transform.position); GUI.Label(new Rect(p.x - 15, Screen.height - p.y - 45, 30, 20), TransferSouls.ToString(), s); } /*else if(GhostTile.renderer.enabled){ * * Vector3 p=Camera.main.WorldToScreenPoint(GhostTile.transform.position); * GUI.Label(new Rect(p.x-15,Screen.height-p.y-40,30,20),TerrainModDelta.ToString(),s); * }*/ }
protected override void SetPrivates() { base.SetPrivates(); CanGoPreviousScene = false; Soul = PlayerPrefsHelper.GetSoul(); _nbCharChoice = Soul.GetStatCurrentValue(Soul.SoulStats[Soul.NbCharChoice_Id]); _choices = new List <Character>(); var maxStartingLevel = Soul.GetStatCurrentValue(Soul.SoulStats[Soul.StartingLevel_Id]); var minStartingLevel = maxStartingLevel - 2 > 1 ? maxStartingLevel - 2 : 1; for (int i = 0; i < _nbCharChoice; ++i) { var tmpChoice = RacesData.GetCharacterFromRaceAndLevel((CharacterRace)Random.Range(0, Helper.EnumCount <CharacterRace>()), Random.Range(minStartingLevel, maxStartingLevel + 1), isPlayer: true); tmpChoice.RunAwayPercent += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.RunAwayPercent_Id]); tmpChoice.LootPercent += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.LootPercent_Id]); tmpChoice.CritChancePercent += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.CritChance_Id]); tmpChoice.InventoryPlace += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.InvPlace_Id]); tmpChoice.InventoryPlace = tmpChoice.InventoryPlace > 6 ? 6 : tmpChoice.InventoryPlace; tmpChoice.WeightLimit += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.InvWeight_Id]); tmpChoice.Gold += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.Gold_Id]); tmpChoice.HpMax += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.Health_Id]); tmpChoice.Hp = Helper.RandomIntMultipleOf(tmpChoice.HpMax / 2, tmpChoice.HpMax, 10); tmpChoice.PmMax += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.Pm_Id]); tmpChoice.PaMax += Soul.GetStatCurrentValue(Soul.SoulStats[Soul.Pa_Id]); _choices.Add(tmpChoice); } Soul.XpKept = (int)(Soul.Xp * Helper.MultiplierFromPercent(0, Soul.GetStatCurrentValue(Soul.SoulStats[Soul.XpKeptPercent_Id]))); Soul.Xp = 0; _skinContainerBhv = GameObject.Find("SkinContainer").GetComponent <SkinContainerBhv>(); _choiceSelector = GameObject.Find("ChoiceSelector"); _characterFrame = GameObject.Find("CharacterFrame"); _playerChoice = _choices[0]; }
private Soul ReadSoul(DbDataReader reader) { { Soul soul = new Soul(); soul.id = GetInt32(reader, "id"); soul.accountId = GetInt32(reader, "account_id"); soul.name = GetString(reader, "name"); soul.level = GetByte(reader, "level"); soul.created = GetDateTime(reader, "created"); soul.password = GetStringNullable(reader, "password"); soul.experienceCurrent = GetUInt64(reader, "experience_current"); soul.warehouseGold = GetUInt64(reader, "warehouse_gold"); soul.pointsLawful = GetInt32(reader, "points_lawful"); soul.pointsNeutral = GetInt32(reader, "points_neutral"); soul.pointsChaos = GetInt32(reader, "points_chaos"); soul.criminalLevel = GetByte(reader, "criminal_level"); soul.pointsCurrent = GetInt32(reader, "points_current"); soul.materialLife = GetInt32(reader, "material_life"); soul.materialReincarnation = GetInt32(reader, "material_reincarnation"); soul.materialLawful = GetInt32(reader, "material_lawful"); soul.materialChaos = GetInt32(reader, "material_chaos"); return(soul); } }
public void ApplySoul(Soul newSoul) { if (newSoul.bVisible == true) { //Then check if we have enough slots List <Soul> lstVisibleSoul = GetVisibleSoul(); if (lstVisibleSoul.Count == nMaxVisibleSoul) { //Then were already using all of our slots //TODO:: Add in a check for locked events //So remove the oldest visible effect Soul soulToRemove = lstVisibleSoul[0]; RemoveSoul(soulToRemove); } } lstSoul.Add(newSoul); //Perform any effect that needs to be done on application newSoul.OnApply(this); //Let others know that the visible soul MAY have changed (not necessarily) subVisibleSoulUpdate.NotifyObs(this); LetOwnerNotifySoulApplied(newSoul); if (ContSkillEngine.bDEBUGENGINE) { PrintAllSoul(); } }
public void AddEvent(long entity_id, int event_id, long handler_id) { Soul soul = (from s in _Souls.UpdateSet() where s.Id == entity_id select s).FirstOrDefault(); if (soul == null) { return; } EventInfo eventInfo = _Protocol.GetMemberMap().GetEvent(event_id); if (eventInfo == null) { return; } if (eventInfo.DeclaringType != soul.ObjectType) { return; } Delegate del = _BuildDelegate(eventInfo, soul.Id, handler_id, _InvokeEvent); Soul.EventHandler handler = new SoulProvider.Soul.EventHandler(soul.ObjectInstance, del, eventInfo, handler_id); soul.AddEvent(handler); }
//Update the units color based off of variables/scenarios public void UpdateHighlight() { //TODO: Make it so this is not called every frame //if(player==-1)return; if (_unitManager.getSelected() == this) { renderer.material.color = Color.blue; //}else if(Hover){ //renderer.material.color=Color.blue; } else if (Moved) { renderer.material.color = Color.yellow; } else { renderer.material.color = Color.white; Soul s = (Soul)GetComponent("Soul"); Host h = (Host)GetComponent("Host"); if (Naked || !(h && s && s.Souls == 0)) { /*if(Player==0){ * renderer.material.color=new Color(1,.3f,.1f); * }else if(Player==1){ * renderer.material.color=new Color(0,1,.9f); * }*/ renderer.material.color = GM.PlayerMan.getColor(this.Player); } } //RANDOM COLORS// //renderer.material.color = new Color(Random.Range(0.0f, 1.0f),Random.Range(0.0f, 1.0f),Random.Range(0.0f, 1.0f)); }
public void OnFieldOfViewEnter(Collider[] others) { Soul targetSoul = null; foreach (Collider collider in others) { Soul otherSoul = collider.GetComponent <Soul>(); if (otherSoul != null) { // Take the first one targetSoul = otherSoul; break; } } if (targetSoul != null) { if (targetSoul.IsBroken) { // Broken vs broken } else { // Broken vs healthy this.soul.SetTargetToFollow(targetSoul); this.soul.SetMovementSpeed(this.followingSpeed); } } }
private void DisplayStat() { var stat = Constants.LastEndActionClickedName; int statId = (int)Soul.GetFieldValue(stat + "_Id"); int statLevel = (int)Soul.GetFieldValue(stat + "_Level"); int statAdd = (int)Soul.GetFieldValue(stat + "_Add"); string statName = Soul.SoulStatsNames[statId]; string statDescription = Soul.SoulStatsDescriptions[statId]; string statUnit = Soul.SoulStatsUnit[statId]; var fullTitle = statName + (statLevel > 0 ? " " + statLevel.ToString() : string.Empty); var currentDescription = statDescription + MakeContent("Current:", " +" + (statAdd * statLevel) + " " + statUnit); //Plural if (statUnit.Length > 3 && statUnit[0] != '<') //Check '<' because of custom materials { if (statAdd * statLevel > 1) { currentDescription += "s"; } } Instantiator.NewPopupYesNo(fullTitle, currentDescription, null, "Ok", AfterDisplayStat); object AfterDisplayStat(bool result) { return(result); } }
//private BrainMapMarker currentMapMarker = null; public BrainMapManager(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, InputManager controls, Vector2 position) { this.audioManager = audioManager; bg = new Sprite(spriteBatch, game, Constants.BRAIN_MAP_BG); mapList = new List<BrainMapMarker>(); List<BrainMapMarker> tmpList = new List<BrainMapMarker>(); /*mapList.Add(tmpList); tmpList = new List<BrainMapMarker>(); mapList.Add(tmpList); tmpList = new List<BrainMapMarker>(); mapList.Add(tmpList);*/ menuManager = new MenuManager(controls); ImageButton button = new ImageButton(spriteBatch, game, controls, new Vector2((float)Constants.RESOLUTION_VIRTUAL_WIDTH * 0.5f - 150, (float)Constants.RESOLUTION_VIRTUAL_HEIGHT * 0.5f + 200), Constants.GUI_CLEANSE, "cleanse"); button.onClick += new ImageButton.ButtonEventHandler(OnButtonPress); menuManager.AddButton(button); button = new ImageButton(spriteBatch, game, controls, new Vector2((float)Constants.RESOLUTION_VIRTUAL_WIDTH * 0.5f + 150, (float)Constants.RESOLUTION_VIRTUAL_HEIGHT * 0.5f + 200), Constants.GUI_BACK, "back"); button.onClick += new ImageButton.ButtonEventHandler(OnButtonPress); menuManager.AddButton(button); menuManager.initialize(); fadeinOut = new FadeInOut(spriteBatch, game, 100); this.position = position; offset = new Vector2((float)bg.X * 0.5f, (float)bg.Y *0.5f); this.controls = controls; }
static void Main(string[] args) { Soul[] soulArrayy = new Soul[5] { new Soul("Nameless1", 1185), new Soul("Nameless2", 1227), new Soul("Nameless3", 1394), new Soul("Nameless4", 2002), new Soul("Nameless5", 108), }; Abyss soulstorage = new Abyss(soulArrayy); foreach (Soul s in soulstorage) { Console.WriteLine(s.Name + " " + s.DeathYear); } int i = 0; Console.WriteLine(" "); while (i < soulArrayy.Length) { Console.WriteLine(soulArrayy[i].Name + " " + soulArrayy[i].DeathYear); i++; } Console.ReadKey(true); }
public Soul(Soul soulToCopy) { chrSource = soulToCopy.chrSource; skillSource = soulToCopy.skillSource; soulContainer = soulToCopy.soulContainer; sName = string.Copy(soulToCopy.sName); bVisible = soulToCopy.bVisible; bLocked = soulToCopy.bLocked; bRemoveOnChrSourceDeath = soulToCopy.bRemoveOnChrSourceDeath; nMaxStacks = soulToCopy.nMaxStacks; nCurStacks = soulToCopy.nCurStacks; bDuration = soulToCopy.bDuration; nCurDuration = soulToCopy.nCurDuration; if (soulToCopy.pnMaxDuration != null) { pnMaxDuration = new Property <int>(soulToCopy.pnMaxDuration); //Ensure any fixed subscribers to pnMaxDuration.subChanged are properly set up InitSubMaxDuration(); } if (soulToCopy.lstReplacements != null) { lstReplacements = new List <Replacement>(soulToCopy.lstReplacements); } InitTriggers(); }
private void OnTriggerEnter(Collider other) { Soul soul = other.GetComponent <Soul>(); if (soul) { numGoalDemon += 1; angel3Dtext.text = numGoalDemon.ToString(); //player.hasTheSoul = false; // a la base je voulais le mettre dans la fonction Reset() de SoulManager mais ça fonctionne pas ???? Destroy(other.gameObject); scoredOnDemonGoal = true; particles.Play(); } //if(other.gameObject.tag == "Player") //{ // PlayerController player = other.GetComponent<PlayerController>(); // player.hasTheSoul = false; //} // *** Méthode avec tag moins propre i think *** //if (other.gameObject.tag == "soul") //{ // Debug.Log("soul"); // Destroy(other.gameObject); //} }
public void AddNotifierUnsupply(long entity_id, int property_id, long notifier_id) { Soul soul = (from s in _Souls.UpdateSet() where s.Id == entity_id select s).FirstOrDefault(); if (soul == null) { return; } PropertyInfo propertyInfo = _Protocol.GetMemberMap().GetProperty(property_id); if (propertyInfo == null) { return; } Type gpiType = propertyInfo.PropertyType.GetGenericArguments().Single(); NotifierEventBinder binder = NotifierEventBinder.Create(soul.ObjectInstance, propertyInfo, nameof(INotifier <object> .Unsupply), (gpi) => _UnbindSupply(gpi, gpiType, notifier_id)); if (binder == null) { return; } soul.AttachUnsupply(notifier_id, binder); }
private void SearchForFirstExistingSoulInY(int positionX, int positionY) { GameObject gridSquare = soulsGrid[positionX][positionY]; int childCount = gridSquare.transform.childCount; if (childCount == 0) { GameObject existingSoul = GetFirsExistingSoulInY(positionX, positionY + 1); if (existingSoul != null) { Soul soul = existingSoul.GetComponent <Soul>(); existingSoul.transform.parent = gridSquare.transform; ChangeSoulPosition(existingSoul, soul, gridSquare); if (positionY + 1 < height) { SearchForFirstExistingSoulInY(positionX, positionY + 1); } } else { soulCreator.InstantiateRandomSoulOnPosition(soulsGrid[positionX][positionY]); FillAllAbove(positionX, positionY + 1); } } else { if (positionY + 1 < height) { SearchForFirstExistingSoulInY(positionX, positionY + 1); } } }
private Soul _NewSoul(object soul, Type soul_type) { MemberMap map = _Protocol.GetMemberMap(); int interfaceId = map.GetInterface(soul_type); Soul newSoul = new Soul(_IdLandlord.Rent(), interfaceId, soul_type, soul); // property PropertyInfo[] propertys = soul_type.GetProperties(BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public); for (int i = 0; i < propertys.Length; ++i) { PropertyInfo property = propertys[i]; int id = map.GetProperty(property); if (property.PropertyType.GetInterfaces().Any(t => t == typeof(IDirtyable))) { object propertyValue = property.GetValue(soul); IDirtyable dirtyable = propertyValue as IDirtyable; PropertyUpdater pu = new PropertyUpdater(dirtyable, id); newSoul.AddPropertyUpdater(pu); } } _Souls.Add(newSoul); return(newSoul); }
public bool UpdateSoul(Soul soul) { int rowsAffected = ExecuteNonQuery(SQL_UPDATE_SOUL, command => { AddParameter(command, "@account_id", soul.accountId); AddParameter(command, "@name", soul.name); AddParameter(command, "@level", soul.level); AddParameter(command, "@created", soul.created); AddParameter(command, "@id", soul.id); AddParameter(command, "@password", soul.password); AddParameter(command, "@experience_current", soul.experienceCurrent); AddParameter(command, "@warehouse_gold", soul.warehouseGold); AddParameter(command, "@points_lawful", soul.pointsLawful); AddParameter(command, "@points_neutral", soul.pointsNeutral); AddParameter(command, "@points_chaos", soul.pointsChaos); AddParameter(command, "@criminal_level", soul.criminalLevel); AddParameter(command, "@points_current", soul.pointsCurrent); AddParameter(command, "@material_life", soul.materialLife); AddParameter(command, "@material_reincarnation", soul.materialReincarnation); AddParameter(command, "@material_lawful", soul.materialLawful); AddParameter(command, "@material_chaos", soul.materialChaos); }); return(rowsAffected > NO_ROWS_AFFECTED); }
void SetView() { Transform Con = tranObj.transform.FindChild("View/scroll/content"); shouhunObj.Clear(); for (int i = 0; i < Con.childCount; i++) { GameObject.Destroy(Con.GetChild(i).gameObject); } GameObject item = tranObj.transform.FindChild("View/scroll/0").gameObject; List <SXML> SoulList = sumXml.GetNodeList("mon_soul"); foreach (SXML Soul in SoulList) { GameObject clon = GameObject.Instantiate(item) as GameObject; clon.SetActive(true); clon.transform.SetParent(Con, false); clon.transform.FindChild("name").GetComponent <Text>().text = Soul.getString("name"); int soulid = Soul.getInt("soul_id"); new BaseButton(clon.transform.FindChild("todo")).onClick = (GameObject go) => { A3_SummonProxy.getInstance().sendshouhun(CurSummonID, (uint)soulid, 1); }; int itemid = Soul.getInt("item_id"); a3_ItemData data = a3_BagModel.getInstance().getItemDataById((uint)itemid); GameObject icon = IconImageMgr.getInstance().createA3ItemIcon(data); icon.SetActive(true); icon.transform.SetParent(clon.transform.FindChild("todo/icon"), false); shouhunObj[soulid] = clon; } }
public bool InsertSoul(Soul soul) { int rowsAffected = ExecuteNonQuery(SQL_INSERT_SOUL, command => { AddParameter(command, "@account_id", soul.accountId); AddParameter(command, "@name", soul.name); AddParameter(command, "@level", soul.level); AddParameter(command, "@created", soul.created); AddParameter(command, "@password", soul.password); AddParameter(command, "@experience_current", soul.experienceCurrent); AddParameter(command, "@warehouse_gold", soul.warehouseGold); AddParameter(command, "@points_lawful", soul.pointsLawful); AddParameter(command, "@points_neutral", soul.pointsNeutral); AddParameter(command, "@points_chaos", soul.pointsChaos); AddParameter(command, "@criminal_level", soul.criminalLevel); AddParameter(command, "@points_current", soul.pointsCurrent); AddParameter(command, "@material_life", soul.materialLife); AddParameter(command, "@material_reincarnation", soul.materialReincarnation); AddParameter(command, "@material_lawful", soul.materialLawful); AddParameter(command, "@material_chaos", soul.materialChaos); }, out long autoIncrement); if (rowsAffected <= NO_ROWS_AFFECTED || autoIncrement <= NO_AUTO_INCREMENT) { return(false); } soul.id = (int)autoIncrement; return(true); }
public void UpdateSoul(Soul _mod) { mod = _mod; UpdateSoulSprite(); UpdateTxtDuration(); }
public RecvDataNotifyCharaBodyData(DeadBody deadBody, NecClient client) // Character character, client) : base((ushort)AreaPacketId.recv_data_notify_charabody_data, ServerType.Area) { _deadBody = deadBody; _character = client.Character; _soul = client.Soul; }
// Update is called once per frame void FixedUpdate() { if (followingTarget) { //handle attraction Collider[] attractables = Physics.OverlapSphere(transform.position, attractionRadius, layerMask); foreach (Collider collider in attractables) { Soul soul = collider.GetComponent <Soul>(); if (soul) { soul.target = this.transform; } } //handle collection Collider[] collectables = Physics.OverlapSphere(transform.position, collectionRadius, layerMask); foreach (Collider collider in collectables) { Soul soul = collider.GetComponent <Soul>(); if (soul && soul.isCollectable && soul.isCollected == false) { soul.isCollected = true; GameManager gameManager = FindObjectOfType <GameManager>(); gameManager.score += soul.soulValue; OnPickup(); } } } }
void OpenFragInfoUI() { Soul soul = m_selBagItem.curData as Soul; if (soul != null) { if (soul.m_config.type == (int)ItemType.Monster_Frage) { MonsterData mon = Core.Data.monManager.getMonsterByNum(soul.m_config.updateId); if (mon != null) { MonFragUI.OpenUI(mon); } else { RED.LogWarning(soul.m_config.ID + " not find monster by monster frag :: " + soul.m_config.updateId); } } else if (soul.m_config.type == (int)ItemType.Equip_Frage) { EquipData equip = Core.Data.EquipManager.getEquipConfig(soul.m_config.updateId); if (equip != null) { YcgEquipInfo.openUI(equip); } else { RED.LogWarning(soul.m_config.ID + " not find equip by equip frag :: " + soul.m_config.updateId); } } } }
public void SetDetail(ItemOfReward mreward) { _ItemOfReward = mreward; if (mreward.getCurType() == ConfigDataType.Monster) { Monster data = mreward.toMonster(Core.Data.monManager); ShowMonster(data); } else if (mreward.getCurType() == ConfigDataType.Equip) { Equipment data = mreward.toEquipment(Core.Data.EquipManager, Core.Data.gemsManager); ShowEquip(data); } else if (mreward.getCurType() == ConfigDataType.Gems) { Gems data = mreward.toGem(Core.Data.gemsManager); ShowGem(data); } else if (mreward.getCurType() == ConfigDataType.Frag) { Soul data = mreward.toSoul(Core.Data.soulManager); ShowFrag(data); } else if (mreward.getCurType() == ConfigDataType.Item) { Item item = mreward.toItem(Core.Data.itemManager); ShowItem(item); } else { RED.LogWarning("unknow reward type"); } _Head.MakePixelPerfect(); }
public Student(string name) { this.name = name; stomach = new Stomach(); soul = new Soul(); brain = new Brain(); }
public override void fullfillByNetwork(BaseResponse response) { if (response != null && response.status != BaseResponse.ERROR) { LoginResponse loginResp = response as LoginResponse; if (loginResp != null && loginResp.data != null && loginResp.data.chip != null) { SoulInfo[] soulInfo = loginResp.data.chip; if (soulInfo != null) { //clear dirty data m_dicSoulBag.Clear(); Core.Data.AccountMgr.clearBagStatus(ConfigDataType.Frag); int length = soulInfo.Length; for (int i = 0; i < length; i++) { Soul soul = new Soul(); soul.m_RTData = soulInfo[i]; if (m_dicConfig.ContainsKey(soulInfo [i].num)) { soul.m_config = m_dicConfig [soulInfo [i].num]; } else { RED.LogWarning(soulInfo [i].num + " not find in soul config"); continue; } m_dicSoulBag.Add(soul.m_RTData.id, soul); if (soul.m_config.type == (int)ItemType.Monster_Frage) { // soul.isNew = Core.Data.AccountMgr.getStatus (soul.m_RTData.id) == BagOfStatus.STATUS_NEW; // Core.Data.AccountMgr.analyseBag (ConfigDataType.Frag, soul.m_RTData.id); if (m_dicMonFrag.ContainsKey(soul.m_config.ID)) { m_dicMonFrag [soul.m_config.ID] = soul; } } else if (soul.m_config.type == (int)ItemType.Equip_Frage) { if (m_dicAtkFrag.ContainsKey(soul.m_config.ID)) { m_dicAtkFrag [soul.m_config.ID] = soul; } else if (m_dicDefFrag.ContainsKey(soul.m_config.ID)) { m_dicDefFrag [soul.m_config.ID] = soul; } } } } CheckAgainCallDragon(loginResp.data.chip); } } }
public ActionResult DeleteConfirmed(int id) { Soul soul = db.Souls.Find(id); db.Souls.Remove(soul); db.SaveChanges(); return(RedirectToAction("Index")); }
public BackgroundManager(SpriteBatch spriteBatch, Soul game) { this.spriteBatch = spriteBatch; this.game = game; this.backgrounds = new List<Background>(); this.killList = new List<Background>(); this.queueList = new List<BackgroundData>(); }
protected virtual void SetPrivates() { Application.targetFrameRate = 60; NavigationService.TrySetCurrentRootScene(SceneManager.GetActiveScene().name); Instantiator = GetComponent <Instantiator>(); Soul = PlayerPrefsHelper.GetSoul(); Journey = PlayerPrefsHelper.GetJourney(); }
private void AddSoul(SoulType soulType) { ActiveSouls.Add(soulType); var soul = Soul.New(soulType, LoadoutSouls); soul.ActivateUniqueEffect(); LoadoutSouls.DeregisterChild(soul); }
void RemoveSoul(SoulType soulType) { ActiveSouls.Remove(soulType); var soul = Soul.New(soulType, LoadoutSouls); soul.DeactivateUniqueEffect(); LoadoutSouls.DeregisterChild(soul); }
public EntityManager(SpriteBatch spriteBatch, Soul game, AudioManager audioManager, LevelManager levelManager) { this.random = new Random(); this.spriteBatch = spriteBatch; this.levelManager = levelManager; this.game = game; this.audioManager = audioManager; this.tutorial = bool.Parse(game.config.getValue("General", "Tutorial")); }
public MenuStateManager(SpriteBatch spriteBatch, Soul game, GraphicsDeviceManager graphics, LinkedList<DisplayMode> displayModes, InputManager inputManager, AudioManager audioManager) { menu = new Dictionary<string, MenuManager>(); this.spriteBatch = spriteBatch; this.game = game; this.inputManager = inputManager; this.audioManager = audioManager; this.graphics = graphics; this.displayModes = displayModes; }
public override void HandleEnemyDead(Character target, Character attacker) { if (attacker == owner) { Soul s = new Soul(); s.srcPos = target.position; s.animlen = target.GetAnimLength("die"); s.destPos = owner.position; s.destPos.y += 1f; s.destChara = owner; s.totaltime = Vector3.Distance(target.position, s.destPos) / speed; souls.Add(s); } }
public override void HandleFriendHpChange(Character target) { if (target.IsDead) { Soul s = new Soul(); s.srcPos = target.position; s.animlen = target.GetAnimLength("die"); s.destPos = owner.position; s.destPos.y += 1f; s.destChara = owner; s.totaltime = Vector3.Distance(target.position, s.destPos) / speed; souls.Add(s); } }
public InputManager(Soul game) { //config = new IniFile("Content\\Config\\config.ini"); //game.config.parse(); this.game = game; up = setKey(game.config.getValue("Controls", "Up")); down = setKey(game.config.getValue("Controls", "Down")); right = setKey(game.config.getValue("Controls", "Right")); left = setKey(game.config.getValue("Controls", "Left")); shoot = setKey(game.config.getValue("Controls", "Shoot")); pause = setKey(game.config.getValue("Controls", "Pause")); debug = Keys.F20; if(bool.Parse(game.config.getValue("Debug", "KeyEnabled"))) { debug = Keys.P; } }
void CacheReferences() { // FIXME asegurarme de que solo lea dos? Quizas Tag "HellPlayer" y tag "HeavenPlayer"? GameObject[] gos = GameObject.FindGameObjectsWithTag("Player"); if(gos.Length > 0){ players = new Player[gos.Length]; for(int i=0;i<gos.Length;++i){ players[i] = gos[i].GetComponent<Player>(); if(players[i].celestialAlignment == CelestialAlignment.HEAVEN){ heavenPlayerIndex = i; }else{ hellPlayerIndex = i; } } } soul = GameObject.FindGameObjectWithTag("Soul").GetComponent<Soul>(); gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameManager>(); }
public abstract void ObtainController(Soul.SoulProvider provider);
void IPhotonFramework.ObtainController(Soul.SoulProvider provider) { ObtainController(provider); }
void HandleOnArrive(Soul soul) { _targetScale = 2f * _initialScale; _souls.Remove(soul); }
float HorizontalPos(Soul soul, float? avoid = null) { float xPos; int soulLane = Lanes.PosToLane(soul.transform.position.x); if(avoid != null){ do{ xPos = Lanes.RandomLanePos(); }while(Lanes.PosToLane(xPos) == soulLane || Lanes.PosToLane(xPos) == avoid); }else{ do{ xPos = Lanes.RandomLanePos(); }while(Lanes.PosToLane(xPos) == soulLane); } return xPos; }
void Spwan(CelestialAlignment alignment, Soul soul) { // Ya hay en el escenario el maximo permitido? if(powerUpsOnScreen.Count >= maxPowerUpsOnScreen) return; // De que pool voy a sacar powerUps PowerUpsPool[] pool = pooledHeavenPowerUps; int alignmentCorrection = 1; if(alignment == CelestialAlignment.HELL){ pool = pooledHellPowerUps; alignmentCorrection = -1; } // Que powerUp lanzar int powerUpTypeIndex = -1; for(int i=0; i<pool.Length;++i){ float randomNum = Random.value; if(pool[i].hasAvailableInstances && randomNum <= pool[i].spawnChances){ powerUpTypeIndex = i; posibleTypesIndices.Add(i); } } if(posibleTypesIndices.Count != 0){ powerUpTypeIndex = posibleTypesIndices[Mathf.FloorToInt(Random.Range(0f, posibleTypesIndices.Count -1))]; posibleTypesIndices.Clear(); } if(powerUpTypeIndex == -1) return; // Donde lanzarlo float xPos, yPos; // Horizontalmente xPos = HorizontalPos(soul); // Verticalmente bool tryOtherPos = true; // me sirve una posicion tal, o tengo que revisar a ver si pisa algo? yPos = -soul.normalizedSoulValue + (0.2f * alignmentCorrection); yPos = (yPos > 0) ? Random.Range(0, yPos) : Random.Range(yPos, 0); yPos *= Game.soul.screenHeight; if(powerUpsOnScreen.Count == 0){ tryOtherPos = false; // no hay nada mas en el escenario, me sirve cualquiera Debug.Log("<color=green>Primero</color>"); } int loops = 0; while(loops <= 5 && tryOtherPos){ for(int i = 0; i<powerUpsOnScreen.Count;++i){ if(Lanes.AlmostEquals(yPos, powerUpsOnScreen[i].transform.position.y, minDistBetweenPowerUps) && Lanes.PosToLane(xPos) == Lanes.PosToLane(powerUpsOnScreen[i].transform.position.x)){ tryOtherPos = true; Debug.Log("<color=blue>Hay algo cerca!</color>"); break; }else tryOtherPos = false; } if(tryOtherPos){ yPos = -soul.normalizedSoulValue + (0.2f * alignmentCorrection); yPos = (yPos > 0) ? Random.Range(0, yPos) : Random.Range(yPos, 0); yPos *= Game.soul.screenHeight; yPos += (0.25f*loops*alignmentCorrection); }else{ Debug.Log("<color=green>Found one!</color>"); } ++loops; } if(tryOtherPos) xPos = HorizontalPos(soul, xPos); Vector3 powerUpPosition = new Vector3(xPos, yPos, 0f); PowerUp p = pool[powerUpTypeIndex].GetInstance(); p.InitializeAt(powerUpPosition); powerUpsOnScreen.Add(p); Debug.Log("<color=white>Spawn</color>"); }
public AudioManager(ContentManager c, Soul game) { content = c; this.game = game; initialize(); }