public static Model getTestModel() { if (model == null) { ModelBuilder modelBuilder = ModelBuilder; Animals.registerType(modelBuilder); Animal.registerType(modelBuilder); AnimalReference.registerType(modelBuilder); Bird.registerType(modelBuilder); ChildRelationshipDefinition.registerType(modelBuilder); Description.registerType(modelBuilder); FlightPartnerRef.registerType(modelBuilder); FlyingAnimal.registerType(modelBuilder); Guardian.registerType(modelBuilder); GuardEgg.registerType(modelBuilder); Mother.registerType(modelBuilder); SpouseRef.registerType(modelBuilder); FriendRelationshipDefinition.registerType(modelBuilder); RelationshipDefinition.registerType(modelBuilder); RelationshipDefinitionRef.registerType(modelBuilder); Egg.registerType(modelBuilder); FlightInstructor.registerType(modelBuilder); Wings.registerType(modelBuilder); model = modelBuilder.build(); } return(model); }
static void CommandPattern() { Waiter waiter = new Waiter(); Pizza pizza1 = new Pizza(new string[1] { "cheese" }); PizzaCommand pizzaCommand1 = new PizzaCommand(pizza1); waiter.AddOrder(pizzaCommand1); Steak steak = new Steak(Steak.SteakType.TBone, Steak.SteakPreperation.WellDone); SteakCommand steakCommand = new SteakCommand(steak); waiter.AddOrder(steakCommand); Wings wing1 = new Wings(Wings.WingFlavor.BBQ, 10); WingsCommand wingsCommand1 = new WingsCommand(wing1); waiter.AddOrder(wingsCommand1); Pizza pizza2 = new Pizza(new string[4] { "chicken", "bacon","ham","pepperoni" }); PizzaCommand pizzaCommand2 = new PizzaCommand(pizza2); waiter.AddOrder(pizzaCommand2); Wings wing2 = new Wings(Wings.WingFlavor.HotGarlic,20); WingsCommand wingsCommand2 = new WingsCommand(wing2); waiter.AddOrder(wingsCommand2); Wings wing3 = new Wings(Wings.WingFlavor.SweetChili, 10); WingsCommand wingsCommand3 = new WingsCommand(wing3); waiter.AddOrder(wingsCommand3); waiter.ExecuteOrder(); Console.WriteLine("**********************"); Console.ReadLine(); }
public Rooster(Wings wings, string indexName) : base(wings, indexName) { var analyzer = new GreekACIAnalyzer(wings.IndexVersion);//ASCIIFoldingFilterFactory var config = new IndexWriterConfig(wings.IndexVersion, analyzer); writer = new IndexWriter(LuceneDirectory, config); }
public Ship SpawnShip() { UpdateSelected(); Ship ship = Instantiate(shipBase, transform.position, shipBase.transform.rotation) as Ship; Wings wing = Instantiate(selectedWing, transform.position + selectedWing.transform.position, selectedWing.transform.rotation) as Wings; Engine engine = Instantiate(selectedEngine, transform.position + selectedEngine.transform.position, selectedEngine.transform.rotation) as Engine; Weapon weapon = Instantiate(selectedWeapon, ship.weapPos.position, selectedWeapon.transform.rotation) as Weapon; Hull hull = Instantiate(selectedHull, transform.position + selectedHull.transform.position, selectedHull.transform.rotation) as Hull; Cockpit cockpit = Instantiate(selectedCockpit, transform.position + selectedCockpit.transform.position, selectedCockpit.transform.rotation) as Cockpit; wing.transform.parent = ship.transform; engine.transform.parent = ship.transform; weapon.transform.parent = ship.weapPos.transform; hull.transform.parent = ship.transform; cockpit.transform.parent = ship.transform; wing.renderer.material.SetColor("_PaintColor", wingColor); engine.renderer.material.SetColor("_PaintColor", engineColor); weapon.renderer.material.SetColor("_PaintColor", weaponColor); hull.renderer.material.SetColor("_PaintColor", hullColor); cockpit.renderer.material.SetColor("_PaintColor", cockpitColor); foreach (ShipComponent c in ship.GetComponentsInChildren <ShipComponent>()) { ApplyUpgrades(c); } ship.Init(); engine.Init(); weapon.Init(); return(ship); }
public PilotFacade() { _cabin = new Cabin(); _engine = new Engine(); _wings = new Wings(); _pa = new PublicAnnouncement(); }
void UpdateSelected() { selectedWing = wings[wingIndex]; selectedEngine = engines[engineIndex]; selectedWeapon = weapons[weaponIndex]; selectedHull = hulls[hullIndex]; selectedCockpit = cockpits[cockpitIndex]; }
/// <summary> /// Sets the Wings value of a given Creature object. /// <para>Will operate on the Creature object's CharacteristicDictionary only if the target key ("Wings") already exists.</para> /// </summary> /// <param name="creature"></param> /// <param name="wings"></param> public static void SetWings(this Creature creature, Wings wings) { if (creature.CharacteristicDictionary.ContainsKey("Wings")) { var setWings = (CharaWings)creature.CharacteristicDictionary["Wings"]; setWings.Wings = wings; } }
public void OnEnabled() { tcsSystem = car.GetComponent <TCSSystem>(); nitro = car.GetComponentInChildren <Nitro>(); epsSystem = car.GetComponent <EPSSystem>(); wings = car.GetComponent <Wings>(); // driftSystem= car.GetComponent<DriftSystem>(); // setupDriftSystem(); }
public ParrotEyes(Wings wings, string indexname) : base(wings, indexname) { if (!DirectoryReader.IndexExists(LuceneDirectory)) { throw new NoIndexException(IndexName, LuceneDirectory.Directory.FullName); } indexReader = DirectoryReader.Open(LuceneDirectory); searcher = new IndexSearcher(indexReader); }
public override void ApplyUpgrade(ShipComponent comp) { Wings w = comp.GetComponent(typeName) as Wings; if (!w) { return; } w.colSelfMult = 1 - colSelfMult; w.colVictimMult = 1 + colVictimMult; }
/// <summary> /// Default Constractor /// </summary> public Indexer(Wings wings) : base(wings, IndexNaming(typeof(T).Name)) { Type leType = typeof(T); var properties = leType.GetProperties(); var geoIndex = properties.Where(x => MetaFinder.PropertyLuceneInfo <LuceneGeoIndex>(x) != null).FirstOrDefault(); //we use spatial location strategy for points if (geoIndex != null) { this.SetPointVectorStrategy($"pvs_{geoIndex.Name}"); } }
public Player(int x, int y, char Symbol, Team TeamNumber, bool autoAim, Game g) : base(x, y, TeamNumber, g) { CurrentState = new IdleState(this); KeyBindings = new Dictionary <Keys, PlayerState>(); IsFiring = true; //always in fire-Mode TemporarilyDead = false; RespawnTime = 300; CurrentRespawnCycleTime = RespawnTime; //Shielded = true; //give him a shield as a starting bonus CurrentPickup = new ShieldPickup(0, 0, TheGame); //player is a bit faster than the others speed = 4; //and has the best weapon from the start CurrentWeapon = new Wings(TheGame, this);//Flamethrower(TheGame, this); this.autoAim = autoAim; this.Symbol = Symbol; }
private void btn_Clear_Click(object sender, EventArgs e) { Small.Value = 0; Medium.Value = 0; Large.Value = 0; ExtraCheese.Checked = false; Pepperoni.Checked = false; Sausage.Checked = false; Soda.Clear(); Wings.Clear(); BreadSticks.Clear(); Pizzas.Clear(); Topings.Clear(); Extras.Clear(); TotalOrder.Clear(); }
public virtual void Init() { weapon = GetComponentInChildren<Weapon>(); engine = GetComponentInChildren<Engine>(); cockpit = GetComponentInChildren<Cockpit> (); hull = GetComponentInChildren<Hull> (); wings = GetComponentInChildren<Wings> (); maxHealth = health = hull.maxHealth; rigidbody2D.mass = hull.mass; shipCollider = GetComponentInChildren<PolygonCollider2D>(); if (wings.maxShield > 0) { wings.parent = this; shipCollider.enabled = false; shieldCollider = GetComponentInChildren<CircleCollider2D>(); shieldCollider.enabled = true; } //activeWeapons = weapons; hitTime = Time.time; }
public virtual void Init() { weapon = GetComponentInChildren <Weapon>(); engine = GetComponentInChildren <Engine>(); cockpit = GetComponentInChildren <Cockpit> (); hull = GetComponentInChildren <Hull> (); wings = GetComponentInChildren <Wings> (); maxHealth = health = hull.maxHealth; rigidbody2D.mass = hull.mass; shipCollider = GetComponentInChildren <PolygonCollider2D>(); if (wings.maxShield > 0) { wings.parent = this; shipCollider.enabled = false; shieldCollider = GetComponentInChildren <CircleCollider2D>(); shieldCollider.enabled = true; } //activeWeapons = weapons; hitTime = Time.time; }
private void Wings_Click(object sender, RoutedEventArgs e) { Wings wingsWindow = new Wings(); wingsWindow.Show(); }
public Birds() { wings = new Wings(); }
public WingsCommand(Wings wings) { _wings = wings; _isCompleted = false; }
public CharaWings(Wings wings) { Wings = wings; }
public void setWings(Wings newWings) { }
public Feather(Wings wings, string indexName) { this.IndexName = indexName; this.wings = wings; }