Example #1
0
    // Initialize player information
    void OnGameBegin(CharacterInfo player1, CharacterInfo player2, StageOptions stage)
    {
        p1 = player1;
        p2 = player2;

        // Get all of the moves' SkillTree handlers
        basic = GetComponent <Basic>();
        basic.GetTree(p1, true);
        basic.GetTree(p2, false);
        handlers[Constants.BASIC] = basic.Resolve;

        strong = GetComponent <Strong>();
        strong.GetTree(p1, true);
        strong.GetTree(p2, false);
        handlers[Constants.STRONG] = strong.Resolve;

        evade = GetComponent <Evade>();
        evade.GetTree(p1, true);
        evade.GetTree(p2, false);
        handlers[Constants.EVADE] = evade.Resolve;

        grab = GetComponent <Grab>();
        grab.GetTree(p1, true);
        grab.GetTree(p2, false);
        handlers[Constants.GRAB] = evade.Resolve;
    }