C# Intermediate C# Abstraction Composition

Chris Domena
Chris Domena
11,139 Points

Declaring a variable vs instantiation

With this Rezing Invader vairables of type BasicInvader and StrongInvader were created but why not instantiate to access the properties and methods?

1 Answer

Steven Parker
Steven Parker
162,995 Points

The internal objects (BasicInvader and StrongInvade) are created when you instantiate the ResurrectingInvader. This happens in the "game.cs" code module.