예제 #1
0
    public virtual void LoadPlayer()
    {
        attackBox = new AttkBox(MOVENUM);
        hitbox = new HitBox();

        stats.LoadStats(STATS_FILE);
        attackBox.LoadFromScript(SCRIPT_FILE, 1, stats.size.y);
        LoadMoveScript(MOVESCRIPT);

        stats.id.num = plNum;//todo not hard code

        attackBox.grabRange = stats.grabRange;
        hitbox = new HitBox();
        fHelper = new NinjaHelper ();
        SetPlayer();
        transform.Rotate(0, 90.0f, 0);
        fHelper.Animate("Idle", true, 0);
        FindPNum();
        hitbox.AllocateFirstIndices(1);//for a 1 dimensional array of vertices
        hitbox.AllocateSecondIndices(0, 4);
        hitbox.SetVertex(-stats.size.x/2, 0, 0, 3);
        hitbox.SetVertex(stats.size.x/2, 0, 0, 2);
        hitbox.SetVertex(stats.size.x/2, stats.size.y, 0, 1);
        hitbox.SetVertex(-stats.size.x/2, stats.size.y, 0, 0);

        //pPtcl.LoadParticles(eng, stats.id.num, "Yara");

        //LoadMoveScript(MOVESCRIPT);
    }