Browse Source

jsonifier experiments.

Mark Sibly 7 years ago
parent
commit
8ef0cd92d1
2 changed files with 5 additions and 6 deletions
  1. 1 0
      src/jsonifier/invocation.monkey2
  2. 4 6
      src/jsonifier/test.monkey2

+ 1 - 0
src/jsonifier/invocation.monkey2

@@ -73,6 +73,7 @@ Class Invocation
 			
 			Local match:=True
 			For Local i:=0 Until args.Length
+				
 				If args[i]
 					
 					If args[i].Type.ExtendsType( ftype.ParamTypes[i] ) Continue

+ 4 - 6
src/jsonifier/test.monkey2

@@ -39,9 +39,7 @@ Class Component
 	
 	Protected
 	
-	Method OnCopy( entity:Entity ) Virtual
-		
-	End
+	Method OnCopy:Component( entity:Entity ) Abstract
 	
 	Method SaveInitialState()
 		
@@ -92,9 +90,9 @@ Class Behaviour Extends Component
 	
 	Internal
 	
-	Method OnCopy( entity:Entity ) Override
+	Method OnCopy:Behaviour( entity:Entity ) Override
 		
-		New Behaviour( Self,entity )
+		Return New Behaviour( Self,entity )
 	End
 	
 	Private
@@ -420,7 +418,7 @@ Function Main()
 	Local saved2:=SaveScene()
 	
 	If CompareJson( saved1,saved2 )=0
-		Print saved1.ToJson()+"~nOkay!"
+		Print saved1.ToJson()+"~nSuccess!"
 	Else
 		Print "saved1:~n"+saved1.ToJson()+"~nsaved2:~n"+saved2.ToJson()+"~nError!"
 	Endif