public void setParameters(ActionParameters parameters)
 {
     location_ = parameters.vector1;
 }
 public void setParameters(ActionParameters parameters)
 {
     Vector2 location = parameters.vector1;
     CoverObject cover = (CoverObject)character_.getActuator().getResource(COVERKEY);
     Vector2 position = character_.getPosition();
     Vector2 dir = cover.needsToFace(position);
     if (cover.needsToFace(location) != dir)
     {
         if (dir.Y != 0)
         {
             location.Y = position.Y;
         }
         else
         {
             location.X = position.X;
         }
     }
     moveTo_ = cover.needsToMove(location, character_.getRadius());
 }
 public bool perform(string actionName, ActionParameters parameters)
 {
     throw new NotImplementedException();
 }
 public void setParameters(ActionParameters parameters)
 {
     coverObject_ = (CoverObject)parameters.object1;
 }
 public void setParameters(ActionParameters parameters)
 {
     runDirection_ = parameters.vector1;
     finished_ = false;
 }
 public void setParameters(ActionParameters parameters)
 {
     if (parameters.object1 != null && parameters.object1 is Missile)
     {
         (parameters.object1 as Missile).setDirection(character_.getDirection());
         (parameters.object1 as Missile).setPosition(character_.getGunHandle(false));
     }
     else
     {
         weapon_ = character_.Weapon_;
     }
 }
示例#7
0
 public void setParameters(ActionParameters parameters)
 {
 }
 public bool perform(String actionName, ActionParameters parameters)
 {
     if (!actions_[currentActionSet_].ContainsKey(actionName))
     {
         throw new NotImplementedException("Invalid action name - " + actionName);
     }
     CharacterActionInterface action = actions_[currentActionSet_][actionName];
     action.setParameters(parameters);
     string actionLevel = action.getActionLevel();
     currentActions_[actionLevel] = currentActions_[actionLevel].interrupt(action);
     if (currentActions_[actionLevel] == action)
     {
         return true;
     }
     return false;
 }
 public void setParameters(ActionParameters parameters)
 {
     grenade_ = (Grenade)parameters.object1;
 }