Ejemplo n.º 1
0
        // Token: 0x06000A59 RID: 2649 RVA: 0x0004DA84 File Offset: 0x0004BC84
        public DownloadUrlRequest(INode node) : base("g")
        {
            this.Id = node.Id;
            PublicNode publicNode = node as PublicNode;

            if (publicNode != null)
            {
                base.QueryArguments["n"] = publicNode.ShareId;
            }
        }
Ejemplo n.º 2
0
    /**
     *@funtion Initialize
     *@brief Crea las variables iniciales de comportamiento y nodos
     *@param
     **/
    public void Initialize()
    {
        playerTeam = transform.parent.GetComponent <STeam>();


        sbehaviors[0] = ScriptableObject.CreateInstance("Alignment") as Sbehavior;
        weights.Add("Alignment", 0.1f);
        wkeys[0]      = "Alignment";
        sbehaviors[1] = ScriptableObject.CreateInstance("Avoidance") as Sbehavior;
        weights.Add("Avoidance", 0.1f);
        wkeys[1]      = "Avoidance";
        sbehaviors[2] = ScriptableObject.CreateInstance("Cohesion") as Sbehavior;
        weights.Add("Cohesion", 0.1f);
        wkeys[2]      = "Cohesion";
        sbehaviors[3] = ScriptableObject.CreateInstance("StayInStadium") as Sbehavior;
        weights.Add("StayInStadium", 0.1f);
        wkeys[3]      = "StayInStadium";
        sbehaviors[4] = ScriptableObject.CreateInstance("GoCenter") as Sbehavior;
        weights.Add("GoCenter", 0.1f);
        wkeys[4]      = "GoCenter";
        sbehaviors[5] = ScriptableObject.CreateInstance("TackleMove") as Sbehavior;
        weights.Add("TackleMove", 0.1f);
        wkeys[5] = "TackleMove";

        cbehaviors[0] = ScriptableObject.CreateInstance("FollowBall") as Cbehavior;
        weights.Add("FollowBall", 0.1f);
        wkeys[sbehaviors.Length] = "FollowBall";
        cbehaviors[1]            = ScriptableObject.CreateInstance("FollowGoal") as Cbehavior;
        weights.Add("FollowGoal", 0.1f);
        wkeys[sbehaviors.Length + 1] = "FollowGoal";
        cbehaviors[2] = ScriptableObject.CreateInstance("ReturnDefault") as Cbehavior;
        weights.Add("ReturnDefault", 0.1f);
        wkeys[sbehaviors.Length + 2] = "ReturnDefault";
        cbehaviors[3] = ScriptableObject.CreateInstance("ReturnInit") as Cbehavior;
        weights.Add("ReturnInit", 0.1f);
        wkeys[sbehaviors.Length + 3] = "ReturnInit";
        cbehaviors[4] = ScriptableObject.CreateInstance("AvoidOpponents") as Cbehavior;
        weights.Add("AvoidOpponents", 0.1f);
        wkeys[sbehaviors.Length + 4] = "AvoidOpponents";
        cbehaviors[5] = ScriptableObject.CreateInstance("FollowOwner") as Cbehavior;
        weights.Add("FollowOwner", 0.1f);
        wkeys[sbehaviors.Length + 5] = "FollowOwner";
        cbehaviors[6] = ScriptableObject.CreateInstance("Defend") as Cbehavior;
        weights.Add("Defend", 0.1f);
        wkeys[sbehaviors.Length + 6] = "Defend";
        cbehaviors[7] = ScriptableObject.CreateInstance("CornerSetup") as Cbehavior;
        weights.Add("CornerSetup", 0.1f);
        wkeys[sbehaviors.Length + 7] = "CornerSetup";



        ///Inicialización de nodos
        KICK_OFFER_Node             = new ActionNode(KICK_OFFER);
        CHECK_ATTACK_Node           = new ActionNode(CHECK_ATTACK);
        GO_ORIGIN_Node              = new ActionNode(GO_ORIGIN);
        CONTROLLING_Node            = new ActionNode(CONTROLLING);
        PASSING_Node                = new PublicNode();
        SHOOTING_Node               = new ActionNode(SHOOTING);
        MOVE_AUTOMATIC_ATTACK_Node  = new ActionNode(MOVE_AUTOMATIC_ATTACK);
        MOVE_AUTOMATIC_DEFFEND_Node = new ActionNode(MOVE_AUTOMATIC_DEFFEND);
        ONE_STEP_BACK_Node          = new ActionNode(ONE_STEP_BACK);
        STOLE_BALL_Node             = new ActionNode(STOLE_BALL);
        PICK_BALL_Node              = new ActionNode(PICK_BALL);
        CHANGE_DIRECTION_Node       = new ActionNode(CHANGE_DIRECTION);
        CORNER_KICK_Node            = new ActionNode(CORNER_KICK);
        ThrowIn_Node                = new ActionNode(ThrowIn);
        TACKLE_Node        = new ActionNode(TACKLE);
        Medio_Tiempo_Node  = new ActionNode(Medio_Tiempo);
        Celebration_Node   = new ActionNode(Celebration);
        LOOK_FOR_BALL_Node = new ActionNode(LOOK_FOR_BALL);
        Oclusion_Node      = new ActionNode(Oclusion);
        //Behavior Tree Nodes
        //###############################################################################
        FootballMatch = new Inverter(KICK_OFFER_Node);
        //###############################################################################
        //public Sequence FootballMatch;
        Attack = new Sequence(new List <Node> {
            CHECK_ATTACK_Node,
            MOVE_AUTOMATIC_ATTACK_Node,
            //PASSING_Node,
            SHOOTING_Node,
        });

        Deffend = new Sequence(new List <Node> {
            MOVE_AUTOMATIC_DEFFEND_Node,
            TACKLE_Node,
            STOLE_BALL_Node,
        });


        RootNode = new Selector(new List <Node> {
            Oclusion_Node,
            FootballMatch,
            CORNER_KICK_Node,
            ThrowIn_Node,
            Attack,
            LOOK_FOR_BALL_Node,
            Deffend,
        });

        TestRoot = new Selector(new List <Node> {
            FootballMatch,
            SHOOTING_Node,
        });



        //Bools de control;
        ControlStates.Add("Kick_Offer", false);
        Ckeys.Add("Kick_Offer");
        ControlStates.Add("Animate", true);
        Ckeys.Add("Animate");
        ControlStates.Add("Passing", false);
        Ckeys.Add("Passing");
        ControlStates.Add("OnArea", false);
        Ckeys.Add("OnArea");
        ControlStates.Add("Tackling", false);
        Ckeys.Add("Tackling");
        ControlStates.Add("StoleBall", false);
        Ckeys.Add("StoleBall");
        ControlStates.Add("Shooting", false);
        Ckeys.Add("Shooting");


        //Tiempos de espera
        ControlTimes.Add("Thinking", 0f);
        Tkeys.Add("Thinking");
        ControlTimes.Add("Tackle", 0f);
        Tkeys.Add("Tackle");
        ControlTimes.Add("Pass", 0f);
        Tkeys.Add("Pass");
        ControlTimes.Add("Reanimate", 0f);
        Tkeys.Add("Reanimate");
    }