private static void Main(string[] args) { HouseService houseService = new HouseService(); SmartHouse smartHouse1 = new SmartHouse(); smartHouse1.Location = "Minsk"; SmartHouse smartHouse2 = smartHouse1; houseService.AddHouse((Building)smartHouse2); Building building = (Building) new SmartHouse(); building.WelcomeGreeting(); houseService.AddHouse(building); ShoppingCenter shoppingCenter1 = new ShoppingCenter(); shoppingCenter1.Location = "Vitebsk"; houseService.AddHouse((Building)shoppingCenter1); houseService.GetBuildings(); IDestroyer destroyer = (IDestroyer) new SmartHouse(); destroyer.Destroy(); bool flag = destroyer is SmartHouse; SmartHouse smartHouse3 = destroyer as SmartHouse; ShoppingCenter shoppingCenter2 = destroyer as ShoppingCenter; }
public GridModel(byte width, byte height) { PlayFieldGrid = new Transform[width, height]; m_destroyer = GameObject.FindGameObjectWithTag("ScriptsObject").GetComponent <Destroyer>(); m_width = width; m_height = height; }
// Use this for initialization void Start() { _destroyer = new WithChildrenDestroyer() { KillCompletely = true }; //DetectActiveCamera(); }
// Use this for initialization void Start() { OriginalHealth = Health; _rigidbody = GetComponent <Rigidbody>(); var exploder = new ShrapnelAndDamageExploder(_rigidbody, Shrapnel, DeathExplosion, ShrapnelCount2) { ExplosionForce = ExplosionForce2, ExplosionBaseDamage = ExplosionDamage2, ShrapnelSpeed = ShrapnelSpeed2, ExplosionRadius = ExplosionRadius2 }; _destroyer = new WithChildrenDestroyer() { Exploder = exploder, UntagChildren = false }; }
// Use this for initialization void Start() { OriginalHealth = Health; _rigidbody = GetComponent <Rigidbody>(); var exploder = new ShrapnelExploder(_rigidbody, Shrapnel, DeathExplosion, ShrapnelCount2) { ShrapnelSpeed = ShrapnelSpeed2 }; _destroyer = new WithChildrenDestroyer() { Exploder = exploder, UntagChildren = false }; if (!string.IsNullOrEmpty(TeamTagForceFieldSuffix)) { IgnoredTags.Add(tag + TeamTagForceFieldSuffix); } }
// Use this for initialization void Start() { StartCalled = true; _rigidbody = GetComponent <Rigidbody>(); var exploder = new ShrapnelExploder(_rigidbody, Shrapnel, DeathExplosion, ShrapnelCount2) { ShrapnelSpeed = ShrapnelSpeed2 }; _destroyer = new WithChildrenDestroyer() { Exploder = exploder, UntagChildren = false }; //if (_destroyer == null) //{ // Debug.LogWarning(gameObject + " has null destroyer"); // Start(); //} }