Exemplo n.º 1
0
    public GameObject SpawnPlayer()
    {
        // spawn random fighter
        GameObject fighter = (GameObject)Instantiate(NetworkManager.singleton.playerPrefab, GetSpawn(), Quaternion.identity);
        var        fc      = fighter.GetComponent <FighterController>();

        fc.InitializeFromFighterType(FighterTypeManager.Random());
        return(fighter);
    }
Exemplo n.º 2
0
    public override void OnStartClient()
    {
        if (NetworkServer.active)
        {
            return;
        }

        FighterType found = FighterTypeManager.Lookup(fighterType);

        ft = found;
        GetComponent <SpriteRenderer>().sprite = ft.skinBody;
    }