public HeroData(int id, CampType campType, string name, RoleType roleType, string description, string path, int hp, int mp, int moveSpeed, int turnSpeed, bool isSkyVision, List <int> seatIndex, int attackDamage, string imagePath) : base(id, campType, name, roleType, description, path, hp, mp, moveSpeed, turnSpeed, isSkyVision, imagePath) { this.seatIndex = seatIndex; this.attackDamage = attackDamage; }
public override List <GamePlayer> GetCanChooseTarget() { CampType m_camp = self_player.CampType; CampType oppo_camp = GameFacade.GetCurrentCardGame().GetOppoType(m_camp); return(GameFacade.GetCurrentCardGame().GetGamePlayersByCamp(oppo_camp)); }
public static bool CheckCampType(VBio self, CampType campType, VBio target) { if ((campType & CampType.Self) > 0 && target == self) { return(true); } if ((campType & CampType.Allied) > 0 && target.property.team == self.property.team && target != self) { return(true); } if ((campType & CampType.Hostile) > 0 && target.property.team != self.property.team && target.property.team != 2) { return(true); } if ((campType & CampType.Neutral) > 0 && target.property.team == 2) { return(true); } return(false); }
public OccupyTerrainEventArgs Fill(CampType from, CampType to) { From = from; To = to; return(this); }
public void SpawnRoles(CampType campType) { facade.PlaySound("Swapn" + campType); foreach (Player player in playerList) { if (player.CampType != campType) { continue; } HeroData rd = GetHeroDataBySeatIndex(player.SeatIndex); GameObject go = Object.Instantiate(rd.RolePrefab, player.SpawnPosition, Quaternion.identity); player.Reference = new GameObject("Player" + player.UserData.Id); player.Reference.transform.SetPositionAndRotation(new Vector3(0, 0, 0), Quaternion.identity); int instanceId = IdCount; SetRoleList(instanceId, go); InitPlayerInfo(rd, go, player, instanceId); SetCurrentRole(go); if (player.CampType == LocalPlayer.CampType) { go.AddComponent <VisualProvider>(); } else { go.AddComponent <VisualTest>(); } if (player.IsLocal) { go.AddComponent <PlayerMove>().SetPlayerMng(this); } } }
public override bool ParseDataRow(string dataRowString, object userData) { string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators); for (int i = 0; i < columnStrings.Length; i++) { columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators); } int index = 0; index++; m_Id = int.Parse(columnStrings[index++]); index++; TestInt = int.Parse(columnStrings[index++]); TestBool = bool.Parse(columnStrings[index++]); TestFloat = float.Parse(columnStrings[index++]); TestVector3 = DataTableExtension.ParseVector3(columnStrings[index++]); TestIntArray = DataTableExtension.ParseInt32Array(columnStrings[index++]); TestFloatArray = DataTableExtension.ParseSingleArray(columnStrings[index++]); TestStringArray = DataTableExtension.ParseStringArray(columnStrings[index++]); TestEnum = DataTableExtension.ParseCampType(columnStrings[index++]); GeneratePropertyArray(); return(true); }
public ImpactData(CampType camp, int hp, int attack, int defense) { m_Camp = camp; m_HP = hp; m_Attack = attack; m_Defense = defense; }
public PlayerData(int id, int heroId, string name, CampType campId, ObjectType type) { m_RoleId = id; m_HeroId = heroId; m_RoleName = name; m_CampId = campId; m_Type = type; m_SkillList = new List <SkillNode>(); //获取英雄品质为1的基础属性 m_HeroAttrNode = FSDataNodeTable <HeroAttrNode> .GetSingleton().FindDataByType(heroId + 1); if (m_HeroAttrNode == null) { return; } for (int i = 0; i < m_HeroAttrNode.skill_id.Length; i++) { SkillNode skillNode = FSDataNodeTable <SkillNode> .GetSingleton().FindDataByType(m_HeroAttrNode.skill_id[i]); m_SkillList.Add(skillNode); } m_HP = m_MaxHP = m_HeroAttrNode.hp; m_HeroModelPath = m_HeroAttrNode.modelNode.respath; m_HeroResourceName = m_HeroModelPath.Split('/')[3]; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { CampType campType = (CampType)value; Color color; switch (campType) { case CampType.Normal: color = Colors.White; break; case CampType.Boss: color = Colors.Red; break; case CampType.Ambush: color = Colors.Yellow; break; default: color = Colors.Transparent; break; } SolidColorBrush brush = new SolidColorBrush(color); brush.Opacity = 0.3; return(brush); }
public static bool CanAttack(VBio attacker, VBio target, CampType campType, EntityFlag targetFlag) { return(!target.isDead && target.property.stealth <= 0 && //不在隐身状态下 CheckCampType(attacker, campType, target) && CheckTargetFlag(targetFlag, target)); }
public MonsterData(int entityId, int typeId, CampType camp, int prize) : base(entityId, typeId, camp) { IDataTable <DRMonster> dtMonster = GameEntry.DataTable.GetDataTable <DRMonster> (); DRMonster drMonster = dtMonster.GetDataRow(typeId); if (drMonster == null) { return; } Name = drMonster.Name; HP = drMonster.HP; MaxHP = HP; MoveSpeed = drMonster.MoveSpeed; RotateSpeed = drMonster.RotateSpeed; Atk = drMonster.Atk; AtkAnimTime = drMonster.AtkAnimTime; AtkRange = drMonster.AtkRange; SeekRange = drMonster.SeekRange; Def = drMonster.Def; AtkSpeed = drMonster.AtkSpeed; this.Prize = prize; for (int i = 0; i < drMonster.GetWeaponCount(); i++) { weaponDatas.Add(new WeaponData(EntityExtension.GenerateSerialId(), drMonster.GetWeaponID(i), Id, Camp)); } }
public override void Init(int resID, int ConfigID, long ServerID, string strEnterAction = "", bool isNpc = false) { m_shadowType = 0; base.Init(resID, ConfigID, ServerID, strEnterAction, isNpc); m_CampType = CampType.NONE; }
public override void OnResponse(string data) { base.OnResponse(data); //Debug.Log(Enum.GetName(typeof(UIPanelType), facade.GetCurrentPanelType())); campType = (CampType)int.Parse(data); isStartPlaying = true; }
public List <GamePlayer> GetGamePlayersByCamp(CampType campType) { List <GamePlayer> list; m_campPlayerList.TryGetValue(campType, out list); return(list); }
public MonsterData(int monsterId, CampType campId, ObjectType type) { m_MonsterId = monsterId; m_CampId = campId; m_Type = type; m_SkillList = new List <SkillNode>(); m_MonsterAttrNode = FSDataNodeTable <MonsterAttrNode> .GetSingleton().FindDataByType(monsterId); Moba3v3NaviNode naviNode = FSDataNodeTable <Moba3v3NaviNode> .GetSingleton().FindDataByType((int)type - 1); m_NaviPos = campId == CampType.BLUE ? new FixVector3((Fix64)naviNode.naviPoint2.x, (Fix64)naviNode.naviPoint2.y, (Fix64)naviNode.naviPoint2.z) : new FixVector3((Fix64)naviNode.naviPoint1.x, (Fix64)naviNode.naviPoint1.y, (Fix64)naviNode.naviPoint1.z); if (m_MonsterAttrNode == null) { return; } for (int i = 0; i < m_MonsterAttrNode.skill_id.Length; i++) { SkillNode skillNode = FSDataNodeTable <MonsterSkillNode> .GetSingleton().FindDataByType(m_MonsterAttrNode.skill_id[i]); m_SkillList.Add(skillNode); } m_HP = m_MaxHP = m_MonsterAttrNode.hp; m_MonsterModelPath = m_MonsterAttrNode.modelNode.respath; m_MonsterResourceName = m_MonsterModelPath.Split('/')[3]; }
public ImpactData(CampType camp, int hp, int attack, float damageReduction) { m_Camp = camp; m_HP = hp; m_Attack = attack; m_DamageReduction = damageReduction; }
public TankData(int entityId, int typeId, CampType camp, string tankId) : base(entityId, typeId, camp) { IDataTable <DRTank> dtTank = GameEntry.DataTable.GetDataTable <DRTank>(); DRTank drTank = dtTank.GetDataRow(TypeId); if (drTank == null) { return; } m_ThrusterData = new ThrusterData(GameEntry.Entity.GenerateSerialId(), drTank.ThrusterId, Id, Camp); m_WeaponData = new WeaponData(GameEntry.Entity.GenerateSerialId(), drTank.WeaponId, Id, Camp); m_ArmorData = new ArmorData(GameEntry.Entity.GenerateSerialId(), drTank.ArmorId, Id, Camp); m_DeadEffectId = drTank.DeadEffectId; m_DeadSoundId = drTank.DeadSoundId; m_TankColor = drTank.TankColor; HP = m_ArmorData.MaxHP; m_Defense = m_ArmorData.Defense; m_TankId = tankId; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { CampType campType = (CampType)value; String result; switch (campType) { case CampType.Normal: result = Resources.CAMP_TYPE_NORMAL; break; case CampType.Boss: result = Resources.CAMP_TYPE_BOSS; break; case CampType.Ambush: result = Resources.CAMP_TYPE_AMBUSH; break; default: result = Resources.CAMP_TYPE_UNKNOWN; break; } return(result); }
public AircraftData(int entityId, int typeId, CampType camp) : base(entityId, typeId, camp) { IDataTable <DRAircraft> dtAircraft = GameEntry.DataTable.GetDataTable <DRAircraft>(); DRAircraft drAircraft = dtAircraft.GetDataRow(TypeId); if (drAircraft == null) { return; } m_ThrusterData = new ThrusterData(GameEntry.Entity.GenerateSerialId(), drAircraft.ThrusterId, Id, Camp); for (int index = 0, weaponId = 0; (weaponId = drAircraft.GetWeaponIdAt(index)) > 0; index++) { AttachWeaponData(new WeaponData(GameEntry.Entity.GenerateSerialId(), weaponId, Id, Camp)); } for (int index = 0, armorId = 0; (armorId = drAircraft.GetArmorIdAt(index)) > 0; index++) { AttachArmorData(new ArmorData(GameEntry.Entity.GenerateSerialId(), armorId, Id, Camp)); } m_DeadEffectId = drAircraft.DeadEffectId; m_DeadSoundId = drAircraft.DeadSoundId; HP = m_MaxHP; }
/// <summary> /// 获取和指定具有特定关系的所有阵营。 /// </summary> /// <param name="camp">指定阵营。</param> /// <param name="relation">关系。</param> /// <returns>满足条件的阵营数组。</returns> public static CampType[] GetCamps(CampType camp, RelationType relation) { KeyValuePair <CampType, RelationType> key = new KeyValuePair <CampType, RelationType>(camp, relation); CampType[] result = null; if (s_CampAndRelationToCamps.TryGetValue(key, out result)) { return(result); } List <CampType> camps = new List <CampType>(); Array campTypes = Enum.GetValues(typeof(CampType)); for (int i = 0; i < campTypes.Length; i++) { CampType campType = (CampType)campTypes.GetValue(i); if (GetRelation(camp, campType) == relation) { camps.Add(campType); } } result = camps.ToArray(); s_CampAndRelationToCamps[key] = result; return(result); }
// ReSharper disable once UnusedMember.Global public void Construct(Data.Team data, BattleUnitFactory battleUnitFactory) { _data = data; _battleUnitFactory = battleUnitFactory; CampType = _data.CampType; }
//获取与阵营存在某一关系的所有阵营 public static CampType[] GetCamps(CampType camp, RelationType relation) { KeyValuePair <CampType, RelationType> key = new KeyValuePair <CampType, RelationType>(camp, relation); CampType[] results = null; if (s_CampAndRelationToCamps.TryGetValue(key, out results)) { return(results); } List <CampType> listCamp = new List <CampType>(); Array arrCamps = Enum.GetValues(typeof(CampType)); for (int i = 0; i < arrCamps.Length; i++) { CampType secondCamp = (CampType)arrCamps.GetValue(i); if (GetRelation(camp, secondCamp) == relation) { listCamp.Add(camp); } } results = listCamp.ToArray(); if (s_CampAndRelationToCamps.ContainsKey(key)) { s_CampAndRelationToCamps[key] = results; } else { s_CampAndRelationToCamps.Add(key, results); } return(results); }
public void ChangeType(CampType type) { if (m_CampType == type) { return; } if (null != m_CampEffect) { CoreEntry.gGameObjPoolMgr.Destroy(m_CampEffect); } m_CampType = type; if (m_CampType == CampType.ME || m_CampType == CampType.FRIEND) { m_CampEffect = CoreEntry.gGameObjPoolMgr.InstantiateEffect(effect_mine); } else if (m_CampType == CampType.ENEMY) { m_CampEffect = CoreEntry.gGameObjPoolMgr.InstantiateEffect(effect_enmy); } if (null != m_CampEffect) { m_CampEffect.transform.parent = transform; m_CampEffect.transform.localPosition = Vector3.zero; m_CampEffect.transform.localEulerAngles = new Vector3(-90f, 0f, 90f); m_CampEffect.transform.localScale = new Vector3(m_EffectSize.x, m_EffectSize.y, 1); } }
public CharactorData(int entityId, int typeId, CampType campType, string key) : base(entityId, typeId) { m_OwnerCampType = campType; m_MoveSpeed = 8f; m_Key = key; DRCharactor_Ability[] arr = GameEntry.DataTable.GetDataTable <DRCharactor_Ability>().GetAllDataRows(); DRCharactor_Ability drCA = null; foreach (var dr in arr) { if (dr.Key == key) { drCA = dr; break; } } if (drCA == null) { return; } m_Armor = drCA.Armor; m_WeaponType = drCA.WeaponType; m_BulletMax = drCA.BulletMax; m_CoolDown = drCA.CoolDown; m_Damage = drCA.Damage; m_Logic = drCA.Logic; }
public ICamp(GameObject campGO, string name, string icon, CampType campType) { mCampGO = campGO; mName = name; mIconSprite = icon; mCampType = campType; mHPValue = 100; }
public ImpactData Fill(CampType camp, int hp, int attack, int defense) { Camp = camp; HP = hp; Attack = attack; Defense = defense; return(this); }
public override void SetGameTarget(GamePlayer player) { base.SetGameTarget(player); CampType m_camp = self_player.CampType; CampType oppo_camp = GameFacade.GetCurrentCardGame().GetOppoType(m_camp); m_gameplayer = GameFacade.GetCurrentCardGame().GetGamePlayersByCamp(oppo_camp); }
public BulletData(int entityId, int typeId, int ownerId, CampType ownerCamp, int attack, float speed) : base(entityId, typeId) { m_OwnerId = ownerId; m_OwnerCamp = ownerCamp; m_Attack = attack; m_Speed = speed; }
/// <summary> /// 创建箭塔 /// </summary> /// <param name="charData"></param> public void CreateTower(CampType campId, ObjectType type) { Tower towerObj = new Tower(); int hp = type == ObjectType.CRYSTAL_TOWER ? 20000 : 10000; TowerData data = new TowerData(campId, type, hp); towerObj.Create(data); GameData.m_ObjectList.Add(towerObj); }
internal Camp(Camp camp) { m_name = camp.Name; m_campType = camp.CampType; m_winTime = camp.m_winTime; m_sectorId = camp.SectorId; m_left = camp.Left; m_top = camp.Top; }
public BaseCamp( int multiID ) : base(multiID) { m_Items = new List<Item>(); m_Mobiles = new List<Mobile>(); m_DecayDelay = TimeSpan.FromMinutes( 30.0 ); RefreshDecay( true ); m_Camp = CampType.Default; Timer.DelayCall( TimeSpan.Zero, new TimerCallback( CheckAddComponents ) ); }
public IList<Camp> GetActiveCamps(CampType campType) { IList<Camp> camps = _campsDataAccess.GetCampsByQuery( new[] { Order.Desc("BeginTime") }, new ICriterion[] { Restrictions.Eq("CampType", campType), Restrictions.Ge("BeginTime", DateTime.Now) }); return camps; }
public void PlayGeZiEffect(int slot, CampType camp) { if (camp == CampType.Enemy) slot += Fight.EnemyBeginSlot; if (m_geZiEffects.Contains(slot) == false) { Fight.Inst.ShowGeZiEffect(slot); m_geZiEffects.Add(slot); } }
public static void ShowBuff(CampType camp, int id, int lv, int attrType) { if (attrType == -1) return; List<Buff> showBuffs = myShowBuffs; if (camp == CampType.Enemy) { showBuffs = enemyShowBuffs; } showBuffs.RemoveAll(r => r.id == id); Buff b = new Buff(); b.id = id; b.lv = lv; b.attrType = attrType; showBuffs.Add(b); Fight.Inst.m_UiInGameScript.InitBuff(); }
public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Items = reader.ReadStrongItemList(); m_Mobiles = reader.ReadStrongMobileList(); m_DecayTime = reader.ReadDeltaTime(); RefreshDecay( false ); m_Prisoner = reader.ReadMobile(); m_Camp = (CampType)reader.ReadInt(); }