Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity Polymorphism

//Is when one scrip derivates from another, for example:

// this is the parent
Class Fruits
{
Public virtual void Name ()
	{
		Print ("FruitName is:")
	}
}
// this is the child:
Class Manzana : Fruits
{
	Public override void Nombre ()
	{
		Print ( Base.Name + "Apple" )
	}
}
 
PREVIOUS NEXT
Tagged: #unity #Polymorphism
ADD COMMENT
Topic
Name
5+3 =