Exemplo n.º 1
0
 public ActionAttackNode(
     Game1 game,
     GameObject parent,
     ActionDefinition actDef
     )
     : base(game, parent, BehaviourNodeType.Action)
 {
     this._actDef = actDef;
 }
 public CurrentActionComponent(
     GameObject parent, 
     ActionComponent action,
     Dictionary<ActionDefinition, ActionInfo> actionsInformation)
     : base(parent)
 {
     curAction = action;
     this.LastActionDef = curAction.GetDefinition();
     this._actionsInformation = actionsInformation;
     this.InProgress = false;
     this.Timing = 0;
 }
        public ActionInfo GetActionInfo()
        {
            ActionDefinition actionDef = new ActionDefinition(
                curAction.curDirection,
                curAction.primaryAction,
                curAction.secondaryAction
            );

            if (this._actionsInformation.ContainsKey(actionDef))
            {
                return this._actionsInformation[actionDef];
            }
            else
            {
                return new ActionInfoMovement();
            }
        }