View Single Post
  #4  
Old 12-22-2011, 11:25 AM
Octocat Octocat is offline
Junior Member
 
Join Date: Dec 2011
Posts: 22
Default

Something like this:

Code:
if (actor != null)
{
  if (actor is AiAirGroup)
  {
    var airgrp = (AiAirGroup)actor;
    // processing air group
  }
  else if (actor is AiAircraft)
  {
    var aircft = (AiAircaft)actor;
    // processing aircraft
  }
  else
  {
     LogMessage("Destroyed unknown actor type: {0}", actor.GetType().Name);
  }
}

Real problem for me, is in ActorDead handler, to separate between actor killed / disapeared events. Has someone solution?
Reply With Quote