private void CustomActivity() { if (NotAddedToManagers.X != 0 || NotAddedToManagers.RelativeX != 0) { throw new Exception("The NotAddedToManagers Entity is moving despite not being added to managers"); } // let's test delayed instantiation if (this.DelayedInstantiationEntityInstance != null) { // Its activity sets itself to Y = 10, so it better have a Y = 10 if (DelayedInstantiationEntityInstance.Y != 10) { throw new Exception("NotInstantiated isn't getting its Activity called after it's instantiated"); } } if (DelayedInstantiationEntityInstance == null) { DelayedInstantiationEntityInstance = new DelayedInstantiationEntity(ContentManagerName); } }
private void CustomActivity() { if (NotAddedToManagers.X != 0 || NotAddedToManagers.RelativeX != 0) { throw new Exception("The NotAddedToManagers Entity is moving despite not being added to managers"); } // let's test delayed instantiation if (this.DelayedInstantiationEntityInstance != null) { // Its activity sets itself to Y = 10, so it better have a Y = 10 if (DelayedInstantiationEntityInstance.Y != 10) { throw new Exception("NotInstantiated isn't getting its Activity called after it's instantiated"); } } if (DelayedInstantiationEntityInstance == null) { DelayedInstantiationEntityInstance = new DelayedInstantiationEntity(ContentManagerName); } }