Example #1
0
 public void InitAI( IAICallback aicallback, int team )
 {
     this.aicallback = aicallback;
     this.team = team;
     aicallback.SendTextMsg( "Hello from Mono AbicWrappers", 0 );
     aicallback.SendTextMsg( "The map name is: " + aicallback.GetMapName(), 0 );
     aicallback.SendTextMsg( "Our ally team is: " + aicallback.GetMyTeam(), 0 );
     
     //int features[10000 + 1];
     //int numfeatures = IAICallback_GetFeatures( aicallback, features, 10000 );
     //sprintf( buffer, "Num features is: %i", numfeatures );
     //IAICallback_SendTextMsg( aicallback, buffer, 0 );
     
     //const FeatureDef *featuredef = IAICallback_GetFeatureDef( aicallback, features[0] );
     //sprintf( buffer, "First feature: %s", FeatureDef_get_myName( featuredef ) );
     //IAICallback_SendTextMsg( aicallback, buffer, 0 );    
     
     IUnitDef unitdef = aicallback.GetUnitDefByTypeId( 34 );
     aicallback.SendTextMsg( "gotunitdef", 0 );
     aicallback.SendTextMsg( "type id 34 is " + unitdef.name, 0 );
     aicallback.SendTextMsg( "human name: " + unitdef.humanName, 0 );
     aicallback.SendTextMsg( "id: " + unitdef.id, 0 );
     
     IMoveData movedata = unitdef.movedata;
     //IAICallback_SendTextMsg( aicallback, "movedata is null? " + ( movedata == 0 );
     //IAICallback_SendTextMsg( aicallback, buffer, 0 );    
     
     //IAICallback_SendTextMsg( aicallback, "movetype: %i" + MoveData_get_movetype( movedata ) );        
     //IAICallback_SendTextMsg( aicallback, buffer, 0 );    
     
     aicallback.SendTextMsg( "maxslope: " + movedata.maxSlope, 0 );
 }
Example #2
0
        public void InitAI(IAICallback aicallback, int team)
        {
            this.aicallback = aicallback;
            this.team       = team;
            aicallback.SendTextMsg("Hello from Mono AbicWrappers", 0);
            aicallback.SendTextMsg("The map name is: " + aicallback.GetMapName(), 0);
            aicallback.SendTextMsg("Our ally team is: " + aicallback.GetMyTeam(), 0);

            //int features[10000 + 1];
            //int numfeatures = IAICallback_GetFeatures( aicallback, features, 10000 );
            //sprintf( buffer, "Num features is: %i", numfeatures );
            //IAICallback_SendTextMsg( aicallback, buffer, 0 );

            //const FeatureDef *featuredef = IAICallback_GetFeatureDef( aicallback, features[0] );
            //sprintf( buffer, "First feature: %s", FeatureDef_get_myName( featuredef ) );
            //IAICallback_SendTextMsg( aicallback, buffer, 0 );

            IUnitDef unitdef = aicallback.GetUnitDefByTypeId(34);

            aicallback.SendTextMsg("gotunitdef", 0);
            aicallback.SendTextMsg("type id 34 is " + unitdef.name, 0);
            aicallback.SendTextMsg("human name: " + unitdef.humanName, 0);
            aicallback.SendTextMsg("id: " + unitdef.id, 0);

            IMoveData movedata = unitdef.movedata;

            //IAICallback_SendTextMsg( aicallback, "movedata is null? " + ( movedata == 0 );
            //IAICallback_SendTextMsg( aicallback, buffer, 0 );

            //IAICallback_SendTextMsg( aicallback, "movetype: %i" + MoveData_get_movetype( movedata ) );
            //IAICallback_SendTextMsg( aicallback, buffer, 0 );

            aicallback.SendTextMsg("maxslope: " + movedata.maxSlope, 0);
        }