Exemplo n.º 1
0
    public PlayerData(KE_MainPlayer_Script player)
    {
        health       = player.GetComponent <AMS_Health_Management>().currentHealth;
        ammoClips1   = player.GetComponent <AMS_GunManagement>().currentClips;
        ammoClips2   = player.GetComponent <AMS_GunManagement>().gun2currentClips;
        ammo1        = player.GetComponent <AMS_GunManagement>().currentAmmo;
        ammo2        = player.GetComponent <AMS_GunManagement>().gun2currentAmmo;
        unlocked     = player.GetComponent <AMS_GunManagement>().unlocked;
        currentLevel = player.GetComponent <MainMenu>().levelIndex;
        altFireammo  = player.GetComponent <AMS_GunManagement>().defaultAlternateFireAmmo;
        currentGun   = player.GetComponent <AMS_GunManagement>().currentGun;
        var chSpawn = StaticCheckpointController.WhereToSpawn();

        spawn[0] = (int)chSpawn.x;
        spawn[1] = (int)chSpawn.y;
        spawn[2] = (int)chSpawn.z;
    }