private void Actor_Spawn(Object sender, SpawnEventArgs e)
 {
     Actor spawnedActor = (Actor)sender;
     ActionList actionList = new ActionList(spawnedActor);
     actionLists[spawnedActor] = actionList;
     actors.Add(spawnedActor);
     Idle idle = new Idle(actionLists[spawnedActor], spawnedActor);
     actionLists[spawnedActor].pushFront(idle);
     spawnedActor.id = actors.IndexOf(spawnedActor);
 }
Ejemplo n.º 2
0
 private void Actor_Spawn(object sender, SpawnEventArgs e)
 {
     Actor spawnedActor = (Actor)sender;
     if (e.spawnType == 1)
     {
         protagonist = spawnedActor;
     }
     else if (e.spawnType == 2)
     {
         ActionList behaviorList = new ActionList(spawnedActor);
         Idle idle = new Idle(behaviorList, spawnedActor);
         behaviorList.pushFront(idle);
         Alert alert = new Alert(behaviorList, spawnedActor, protagonist);
         behaviorList.pushFront(alert);
         behaviorLists[spawnedActor] = behaviorList;
     }
     //actors.Add(spawnedActor);
 }