/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Revolution game = new Revolution()) { game.Run(); } }
private void AddRevolution(Transform trans, GameObject center) { GameObject obj = trans.gameObject; obj.AddComponent <Revolution>(); Revolution r = obj.GetComponent <Revolution>(); r.center = center; r.speed = 300 / obj.transform.position.x * Random.Range(1f, 1.5f); r.plane = new Vector3(0, Random.Range(0, 1000) / 10f, Random.Range(0, 1000) / 10f); }
protected override void onStart() { // Récupération de l'échelle de temps time = countrySimData.GetComponent <TimeScale>(); // Récupération des masques masks = countrySimData.GetComponent <Masks>(); // Récupération des stats du vaccin vaccine = countrySimData.GetComponent <Vaccine>(); // Récupération des données financières finances = countrySimData.GetComponent <Finances>(); // Récupération des données de révolution revolution = countrySimData.GetComponent <Revolution>(); }
protected override void onStart() { // Récupération de l'échelle de temps time = countrySimData.GetComponent <TimeScale>(); // Récupération des stats du virus virusStats = countrySimData.GetComponent <VirusStats>(); // Récupération des données du vaccin vaccine = countrySimData.GetComponent <Vaccine>(); // Récupération des finances finances = countrySimData.GetComponent <Finances>(); // Récupération de données de la frontière frontierPermeability = countrySimData.GetComponent <FrontierPermeability>(); // Récupération du stress de la population revolution = countrySimData.GetComponent <Revolution>(); // Récupération des données de la population countryPopData = countrySimData.GetComponent <TerritoryData>(); }
private void AddBehaviours(CampaignGameStarter gameInitializer) { _modOptions = new ModOptions(); _revolutionBehaviour = new Revolution(); _mobChecker = new MobChecker(); _debugBehaviour = new DebugCampaignBehaviour(); _common = new Common(); gameInitializer.AddBehavior(_revolutionBehaviour); gameInitializer.AddBehavior(_modOptions); gameInitializer.AddBehavior(_mobChecker); gameInitializer.AddBehavior(_debugBehaviour); _loyaltyModel = new LoyaltyModel(); _loyaltyModel.RevolutionBehaviour = _revolutionBehaviour; gameInitializer.AddModel(_loyaltyModel); gameInitializer.LoadGameTexts($"{BasePath.Name}Modules/Revolutions/ModuleData/global_strings.xml"); }
protected override void onStart() { // Récupération de l'échelle de temps time = countrySimData.GetComponent <TimeScale>(); // Récupération de données de la frontière frontierPermeability = countrySimData.GetComponent <FrontierPermeability>(); // Récupération du stress de la population revolution = countrySimData.GetComponent <Revolution>(); // Récupération des données de la population countryPopData = countrySimData.GetComponent <TerritoryData>(); // Récupération des données du télétravail remoteworking = countrySimData.GetComponent <Remoteworking>(); // Récupération des données du chômage partiel shortTimeWorking = countrySimData.GetComponent <ShortTimeWorking>(); // Récupération des données du soutien aux entreprises tax = countrySimData.GetComponent <Tax>(); // Récupération des données des masques masks = countrySimData.GetComponent <Masks>(); }
/// <summary> /// Create one rectangular profile revolution /// </summary> private void CreateRevolution() { try { #region Create rectangular profile CurveArrArray curveArrArray = new CurveArrArray(); CurveArray curveArray = new CurveArray(); Autodesk.Revit.DB.XYZ normal = Autodesk.Revit.DB.XYZ.BasisZ; SketchPlane sketchPlane = CreateSketchPlane(normal, Autodesk.Revit.DB.XYZ.Zero); // create one rectangular profile revolution Autodesk.Revit.DB.XYZ p0 = Autodesk.Revit.DB.XYZ.Zero; Autodesk.Revit.DB.XYZ p1 = new Autodesk.Revit.DB.XYZ(10, 0, 0); Autodesk.Revit.DB.XYZ p2 = new Autodesk.Revit.DB.XYZ(10, 10, 0); Autodesk.Revit.DB.XYZ p3 = new Autodesk.Revit.DB.XYZ(0, 10, 0); Line line1 = Line.CreateBound(p0, p1); Line line2 = Line.CreateBound(p1, p2); Line line3 = Line.CreateBound(p2, p3); Line line4 = Line.CreateBound(p3, p0); Autodesk.Revit.DB.XYZ pp = new Autodesk.Revit.DB.XYZ(1, -1, 0); Line axis1 = Line.CreateBound(Autodesk.Revit.DB.XYZ.Zero, pp); curveArray.Append(line1); curveArray.Append(line2); curveArray.Append(line3); curveArray.Append(line4); curveArrArray.Append(curveArray); #endregion // here create rectangular profile revolution Revolution revolution1 = m_creationFamily.NewRevolution(true, curveArrArray, sketchPlane, axis1, -Math.PI, 0); // move to proper place Autodesk.Revit.DB.XYZ transPoint1 = new Autodesk.Revit.DB.XYZ(0, 32, 0); ElementTransformUtils.MoveElement(m_familyDocument, revolution1.Id, transPoint1); } catch (Exception e) { m_errCount++; m_errorInfo += "Unexpected exceptions occur in CreateRevolution: " + e.ToString() + "\r\n"; } }
private void Stream( ArrayList data, Revolution rev ) { data.Add( new Snoop.Data.ClassSeparator( typeof( Revolution ) ) ); data.Add( new Snoop.Data.Object( "Axis", rev.Axis ) ); data.Add( new Snoop.Data.Angle( "Start angle", rev.StartAngle ) ); data.Add( new Snoop.Data.Angle( "End angle", rev.EndAngle ) ); data.Add( new Snoop.Data.Object( "Sketch", rev.Sketch ) ); }
void Awake() { instance = this; }
public void setValueRevolution(double value) { Revolution.setValue(Convert.ToInt32(value)); }
public FamilyGeometryForm(Autodesk.Revit.DB.GenericForm form) { Id = form.Id.IntegerValue; this.geomVisibility = new GeometryVisibility(form.GetVisibility()); //Autodesk.Revit.DB.Parameter sketchPlaneParam = form.get_Parameter(Autodesk.Revit.DB.BuiltInParameter.SKETCH_PLANE_PARAM); //if(sketchPlaneParam != null) //{ // this. //} IsSolidGeometry = form.IsSolid; if (form.Subcategory == null) { SubcategoryName = ""; } else { SubcategoryName = form.Subcategory.Name; } if (form is Extrusion) { FormType = FormTypeEnum.Extrusion; Extrusion ex = form as Extrusion; Sketch extrusionProfile = ex.Sketch; GeometrySketch gs = new GeometrySketch(extrusionProfile); List_Profiles = new List <GeometrySketch> { gs }; } else if (form is Blend) { FormType = FormTypeEnum.Blend; Blend bl = form as Blend; GeometrySketch TopProfile = new GeometrySketch(bl.TopSketch); GeometrySketch BottomProfile = new GeometrySketch(bl.BottomSketch); List_Profiles = new List <GeometrySketch> { TopProfile, BottomProfile }; } else if (form is Revolution) { FormType = FormTypeEnum.Revolution; Revolution rev = form as Revolution; Sketch revProfile = rev.Sketch; GeometrySketch gs = new GeometrySketch(revProfile); GeometrySketch axis = new GeometrySketch(rev.Axis.Id.IntegerValue, -1, null); List_Profiles = new List <GeometrySketch> { gs, axis }; } else if (form is Sweep) { FormType = FormTypeEnum.Sweep; Sweep sw = form as Sweep; List_Profiles = new List <GeometrySketch>(); if (sw.Path3d != null) { GeometrySketch gs = new GeometrySketch(sw.Path3d); List_Profiles.Add(gs); } else if (sw.PathSketch != null) { GeometrySketch gs = new GeometrySketch(sw.PathSketch); List_Profiles.Add(gs); } if (sw.ProfileSymbol != null) { GeometrySketch gs = new GeometrySketch(sw.ProfileSymbol.Profile.Id.IntegerValue, -1, null); } else if (sw.ProfileSketch != null) { GeometrySketch gs = new GeometrySketch(sw.ProfileSketch); List_Profiles.Add(gs); } } else if (form is SweptBlend) { FormType = FormTypeEnum.SweptBlend; SweptBlend sb = form as SweptBlend; List_Profiles = new List <GeometrySketch>(); if (sb.SelectedPath != null) { Curve path = sb.SelectedPath; GeometrySketch gs = new GeometrySketch(path.Reference.ElementId.IntegerValue, -1, null); List_Profiles.Add(gs); } else if (sb.PathSketch != null) { GeometrySketch gs = new GeometrySketch(sb.PathSketch); List_Profiles.Add(gs); } GeometrySketch gs1 = new GeometrySketch(sb.TopProfile); GeometrySketch gs2 = new GeometrySketch(sb.BottomProfile); List_Profiles.Add(gs1); List_Profiles.Add(gs2); } }
void Start() { normal = 1f; election = GetComponent<Election>(); influence = GetComponent<Influence>(); revolution = GetComponent<Revolution>(); oppositionDelta = -1; netGrowth = 0; // StartCoroutine(Run()); prompt = false; }