public static string GetLayerName(LAYER layer) { switch (layer) { case LAYER.TANK: return("LayerTank"); case LAYER.TRACK: return("LayerTrack"); case LAYER.BULLET: return("LayerBullet"); case LAYER.EFFECT: return("LayerEffect"); case LAYER.OTHER: return("LayerOther"); } return(null); }
public void Set(LAYER layer) { Layer = layer; gameObject.name = "Layer_" + layer.C2; //LayerMaterial = new Material(GoDefaultMat); //if (ACI.ContainsKey(layer.C62)) //{ // LayerMaterial.color = ACI[layer.C62]; // //if (layer.C62 == 7 || layer.C62 == 8) ZoomAdjust = 0.6f;//nemo //} //else //{ // LayerMaterial.color = Color.white; // //ZoomAdjust = 0.8f;//默认颜色的层线段宽度做限制 //} }
private void GetVariables() { _storyID = Global.Instance.StoryID; _parentMapID = Global.Instance.MapID; var forgeDatabase = Global.Instance.ForgeDatabase(); LAYER layer = forgeDatabase.Layers.Single(l => l.MapID == Global.Instance.MapID && l.Name.Contains("Point Layer")); _layerID = layer.ID; PopupBoxIcon.Foreground = Brushes.Black; _pushPinTop = Global.Instance.CurrentMapTop; _pushPinLeft = Global.Instance.CurrentMapLeft; IsBaseMapCheckbox.IsChecked = false; IsBaseMapCheckbox.IsEnabled = false; }
/// <summary> /// 弾を初期化する(発射するときに使う) /// </summary> /// <param name="pos">初期位置</param> /// <param name="velocity">初速度</param> /// <param name="layer">レイヤー(当たり判定など)</param> /// <param name="damage">攻撃力</param> /// <param name="hp">耐久力</param> /// <param name="lifetime">滞空時間</param> public virtual void SetParam(Vector3 localVelocity, LAYER layer, int damage = 1, int hp = 1, float lifetime = float.MaxValue) { // 初速度(0,1,0基準) LocalVelocity = localVelocity; // HP初期化 InitHp(hp); // 攻撃力設定 SetAttackPower(damage); // 回復力設定(弾は回復しない(今のところ)) SetHealPower(0); // 弾のレイヤー(当たり判定とかで使う) m_layer = layer; // 生存可能時間設定 m_lifetime = lifetime; }
public void Set(LAYER layer) { Layer = layer; gameObject.name = "Layer_" + layer.C2; LayerMaterial = new Material(GoDefaultMat); if (ACI.ContainsKey(layer.C62)) { LayerMaterial.color = ACI[layer.C62]; if (layer.C62 == 7 || layer.C62 == 8) { ZoomAdjust = 0.6f; } } else { LayerMaterial.color = Color.white; ZoomAdjust = 0.8f;//默认颜色的层线段宽度做限制 } }
private void objectLyaerToolStripMenuItem_Click(object sender, EventArgs e) { _selectedLayer = LAYER.OBJECT; ClearLayerChecked(); objectLyaerToolStripMenuItem.Checked = true; }
private void fringeLayerToolStripMenuItem_Click(object sender, EventArgs e) { _selectedLayer = LAYER.FRINGE; ClearLayerChecked(); fringeLayerToolStripMenuItem.Checked = true; }
// //ORIGINAL LINE: Combine& addImage(TextureBuffer* image, COMBINE_METHOD method = METHOD_LAYER) public Combine addImage(TextureBuffer image, COMBINE_METHOD method) { if (image != null) if (image.getHeight() >= mBuffer.getHeight() && image.getWidth() >= mBuffer.getWidth()) { LAYER l = new LAYER(); l.action = method; l.image = image; mQueue.Enqueue(l); } return this; }
GetLayerTank(float BaseHP,float LayerMultiplier,float ResistEM,float ResistThermal,float ResistKinetic,float ResistExplosive,bool isPolarized,LAYER Layer,IReadOnlyCollection <Tuple <ModuleDescription,uint> > Modules,float ShipOverheatingBonus) { float FlatHPBonus = 0.0f; float HPMultiplier = LayerMultiplier; // resist => cold/hot => stacking_group => list of resist bonuses Dictionary <RESIST,Dictionary <bool,Dictionary <int,List <float> > > > ResistBonuses = new Dictionary <RESIST,Dictionary <bool,Dictionary <int,List <float> > > >(); float SubsystemOverheatingBonus = 0.0f; foreach (Tuple <ModuleDescription,uint> ModuleAndCount in Modules) { uint Count = ModuleAndCount.Item2; if (ModuleAndCount.Item1.m_Effects.ContainsKey(Layer)) { if (ModuleAndCount.Item1.m_Effects[Layer].ContainsKey(EFFECT.OVERHEATING)) { if (ModuleAndCount.Item1.m_Effects[Layer][EFFECT.OVERHEATING].ContainsKey(ACTIVE.PASSIVE)) { // Only subsystems (passive modules) can be with overheating bonus. // Not active and not assault DCs. Debug.Assert(Count == 1); Debug.Assert(SubsystemOverheatingBonus <= 0.0f); SubsystemOverheatingBonus = ModuleAndCount.Item1.m_Effects[Layer][EFFECT.OVERHEATING][ACTIVE.PASSIVE].Item1; Debug.Assert(SubsystemOverheatingBonus > 0.0f); } } } } foreach (Tuple <ModuleDescription,uint> ModuleAndCount in Modules) { uint Count = ModuleAndCount.Item2; if (ModuleAndCount.Item1.m_Effects.ContainsKey(Layer)) { foreach (EFFECT Effect in ModuleAndCount.Item1.m_Effects[Layer].Keys) { foreach (ACTIVE Active in ModuleAndCount.Item1.m_Effects[Layer][Effect].Keys) { Tuple <float,int> EffectParams = ModuleAndCount.Item1.m_Effects[Layer][Effect][Active]; switch (Effect) { case EFFECT.ADD: Debug.Assert(Active == ACTIVE.PASSIVE); // all flat shield/armor/hull bonuses belong to passive modules Debug.Assert(EffectParams.Item2 == 1); // all flat shield/armor/hull bonuses have stacking group 1 FlatHPBonus += (EffectParams.Item1 * Count); break; case EFFECT.MULTIPLY: Debug.Assert(Active == ACTIVE.PASSIVE); // all multiplicative shield/armor/hull bonuses belong to passive modules Debug.Assert(EffectParams.Item2 == 1); // all multiplicative shield/armor/hull bonuses have stacking group 1 HPMultiplier *= (float)Math.Pow(EffectParams.Item1,Count); break; case EFFECT.EM: case EFFECT.THERMAL: case EFFECT.KINETIC: case EFFECT.EXPLOSIVE: if (!isPolarized) { RESIST Resist = EffectToResist(Effect); switch (Active) { case ACTIVE.PASSIVE: // passive effect AddTo(ref ResistBonuses,Resist,false,EffectParams.Item2,EffectParams.Item1,Count); AddTo(ref ResistBonuses,Resist,true,EffectParams.Item2,EffectParams.Item1,Count); break; case ACTIVE.ACTIVE: // active effect if (!PassiveTank) { AddTo(ref ResistBonuses,Resist,false,EffectParams.Item2,EffectParams.Item1,Count); float OverloadBonus = ModuleAndCount.Item1.m_OverloadBonus; if (OverloadBonus > 0.01f) { float OverloadedResist = EffectParams.Item1 * (1.0f + OverloadBonus * (1.0f + ShipOverheatingBonus + SubsystemOverheatingBonus)); AddTo(ref ResistBonuses,Resist,true,EffectParams.Item2,OverloadedResist,Count); } else { AddTo(ref ResistBonuses,Resist,true,EffectParams.Item2,EffectParams.Item1,Count); } } break; case ACTIVE.ASSAULT_PASSIVE: // bonus from passive ADC if (PassiveTank || !AssaultDCEnabled) { AddTo(ref ResistBonuses,Resist,false,EffectParams.Item2,EffectParams.Item1,Count); AddTo(ref ResistBonuses,Resist,true,EffectParams.Item2,EffectParams.Item1,Count); } break; case ACTIVE.ASSAULT_ACTIVE: // bonus from active ADC if (!PassiveTank && AssaultDCEnabled) { AddTo(ref ResistBonuses,Resist,false,EffectParams.Item2,EffectParams.Item1,Count); AddTo(ref ResistBonuses,Resist,true,EffectParams.Item2,EffectParams.Item1,Count); } break; } } break; } } } } } float LayerHP = (BaseHP + FlatHPBonus) * HPMultiplier; LayerHP *= 1.25f; // Shield Management / Hull Upgrades / Mechanics Dictionary <RESIST,float> ResistsCold = new Dictionary <RESIST,float>(); Dictionary <RESIST,float> ResistsHot = new Dictionary <RESIST,float>(); if (!isPolarized) { Dictionary <RESIST,Dictionary <bool,float> > Resonances = new Dictionary <RESIST,Dictionary <bool,float> >(); Resonances[RESIST.EM] = new Dictionary <bool,float>(); Resonances[RESIST.THERMAL] = new Dictionary <bool,float>(); Resonances[RESIST.KINETIC] = new Dictionary <bool,float>(); Resonances[RESIST.EXPLOSIVE] = new Dictionary <bool,float>(); foreach (RESIST Resist in ResistBonuses.Keys) { foreach (bool Hot in ResistBonuses[Resist].Keys) { float ResonanceCombined = 1.0f; foreach (int StackGroup in ResistBonuses[Resist][Hot].Keys) { List <float> ResistsGroup = ResistBonuses[Resist][Hot][StackGroup]; ResistsGroup.Sort( delegate(float a,float b) { if (a < b) { return(1); } if (a > b) { return(-1); } return(0); } ); float Resonance = 1.0f; for (int i = 0; i < ResistsGroup.Count; ++i) { float pc = PenaltyCoeff(i); Resonance *= (1.0f - ResistsGroup[i] * pc); } ResonanceCombined *= Resonance; } Resonances[Resist][Hot] = ResonanceCombined; } } ResistsCold[RESIST.EM] = 1.0f - (1.0f - ResistEM) * GetResonance(Resonances,RESIST.EM,false); ResistsCold[RESIST.THERMAL] = 1.0f - (1.0f - ResistThermal) * GetResonance(Resonances,RESIST.THERMAL,false); ResistsCold[RESIST.KINETIC] = 1.0f - (1.0f - ResistKinetic) * GetResonance(Resonances,RESIST.KINETIC,false); ResistsCold[RESIST.EXPLOSIVE] = 1.0f - (1.0f - ResistExplosive) * GetResonance(Resonances,RESIST.EXPLOSIVE,false); ResistsHot[RESIST.EM] = 1.0f - (1.0f - ResistEM) * GetResonance(Resonances,RESIST.EM,true); ResistsHot[RESIST.THERMAL] = 1.0f - (1.0f - ResistThermal) * GetResonance(Resonances,RESIST.THERMAL,true); ResistsHot[RESIST.KINETIC] = 1.0f - (1.0f - ResistKinetic) * GetResonance(Resonances,RESIST.KINETIC,true); ResistsHot[RESIST.EXPLOSIVE] = 1.0f - (1.0f - ResistExplosive) * GetResonance(Resonances,RESIST.EXPLOSIVE,true); } else { ResistsCold[RESIST.EM] = 0.0f; ResistsCold[RESIST.THERMAL] = 0.0f; ResistsCold[RESIST.KINETIC] = 0.0f; ResistsCold[RESIST.EXPLOSIVE] = 0.0f; ResistsHot[RESIST.EM] = 0.0f; ResistsHot[RESIST.THERMAL] = 0.0f; ResistsHot[RESIST.KINETIC] = 0.0f; ResistsHot[RESIST.EXPLOSIVE] = 0.0f; } return(new Tuple <float,Dictionary <RESIST,float>,Dictionary <RESIST,float> >(LayerHP,ResistsCold,ResistsHot)); }
public static int ToInt(LAYER layer) { return((int)layer); }
protected override Property ReadSonClass(Property prop) { switch (prop.Value) { case "APPID": return CreateSonClass(new VPORT(DXFData, prop)); case "BLOCK_RECORD": return CreateSonClass(new BLOCK_RECORD(DXFData, prop)); case "DIMSTYLE": return CreateSonClass(new DIMSTYLE(DXFData, prop)); case "LAYER": var layer = new LAYER(DXFData, prop); LAYERList.Add(layer); return layer.ReadProperties(); case "LTYPE": return CreateSonClass(new LTYPE(DXFData, prop)); case "STYLE": return CreateSonClass(new STYLE(DXFData, prop)); case "UCS": return CreateSonClass(new UCS(DXFData, prop)); case "VIEW": return CreateSonClass(new VIEW(DXFData, prop)); case "VPORT": return CreateSonClass(new VPORT(DXFData, prop)); default: return base.ReadSonClass(prop); } }
public void SetCurrentLayer(LAYER l) { currentLayer = l; }
public void Set(LAYER layer) { Layer = layer; gameObject.name = "Layer_" + layer.C2; }
private void secondBaseLayerToolStripMenuItem_Click(object sender, EventArgs e) { _selectedLayer = LAYER.SECONDBASE; ClearLayerChecked(); secondBaseLayerToolStripMenuItem.Checked = true; }
public override void SetParam(Vector3 velocity, LAYER layer, int damage = 1, int hp = 1, float lifetime = float.MaxValue) { base.SetParam(velocity, layer, damage, hp, lifetime); m_constantAcceleration = Vector3.zero; }
public void SetCurrentLayer(LAYER l) { currentLayer = l; }
public void Set(LAYER layer) { Layer = layer; gameObject.name = "Layer_" + layer.C2; LayerMaterial = new Material(GoDefaultMat); if (ACI.ContainsKey(layer.C62)) { LayerMaterial.color = ACI[layer.C62]; if (layer.C62 == 7 || layer.C62 == 8) ZoomAdjust = 0.6f; } else { LayerMaterial.color = Color.white; ZoomAdjust = 0.8f;//默认颜色的层线段宽度做限制 } }