Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     cors = Resources.LoadAll <Sprite>("Hearts");
     rpg  = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerRpg>();
     inv  = GameObject.FindGameObjectWithTag("Player").GetComponent <Inventory>();
     Life();
 }
Exemplo n.º 2
0
 public void Awake()
 {
     Open();
     rpg        = gameObject.GetComponent <PlayerRpg>();
     rpg.itemDb = itemDb;
     print("started");
 }
Exemplo n.º 3
0
    public static SerialPlayerRpg SerializePlayerRpg(PlayerRpg player)
    {
        string spointstab = SerializeSpAquisitionTable(player.spAcquisitionTable);

        return(new SerialPlayerRpg(player.playerName, player.Yang, player.Level, player.Exp, player.StatusPoints, spointstab,
                                   player.currentHp, player.Energy, player.Stamina,
                                   player.BaseVit, player.BaseInt, player.BaseStr, player.BaseDex));
    }
Exemplo n.º 4
0
 public void SetupUpgradeWindow(ItemUI _item, ItemUI _ogItem, PlayerRpg _playerRpg)
 {
     SetItem(_item);
     ogItem    = _ogItem;
     playerRpg = _playerRpg;
     UpgradeWindow.SetActive(true);
     SetDescriptionText();
     SetCostText();
 }
Exemplo n.º 5
0
    private void RpcLoadPositionFromDatabase(float x, float y, float z, string playerName)
    {
        PlayerRpg localPlayer = GameObject.Find("LocalPlayer").GetComponent <PlayerRpg>();

        if (localPlayer.playerName.Equals(playerName))
        {
            GlobalSerialization.DeserializePosition(new SerialPosition(x, y, z), localPlayer.gameObject);
        }
    }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     cHp      = hp;
     img      = Resources.LoadAll <Sprite>("Graphics/Icons/EffectIcons");
     player   = GameObject.FindGameObjectWithTag("Player");
     enAnim   = Resources.LoadAll <Sprite>("Graphics/Enemies/" + link);
     pRpg     = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerRpg>();
     effectDb = pRpg.gameObject.GetComponent <StatsModifiers>().effectDb;
 }
Exemplo n.º 7
0
    private void RpcLoadPlayerRpgFromDatabase(string cName, long yang, int level, long exp,
                                              int sPoints, string sPointsTab, float cHp, float cEn, float cSt,
                                              int bVit, int bInt, int bStr, int bDex, string playerName)
    {
        PlayerRpg localPlayer = GameObject.Find("LocalPlayer").GetComponent <PlayerRpg>();

        if (localPlayer.playerName.Equals(playerName))
        {
            GlobalSerialization.DeserializePlayerRpg(new SerialPlayerRpg(cName,
                                                                         yang, level, exp, sPoints, sPointsTab, cHp, cEn, cSt, bVit, bInt, bStr, bDex), localPlayer);
            localPlayer.SetupStatusAfterLoad();
        }
    }
Exemplo n.º 8
0
    // Start is called before the first frame update
    void Start()
    {
        nameplate.transform.parent.SetParent(null);
        nameplate.transform.parent.rotation = new Quaternion(0, 0, 0, nameplate.transform.parent.rotation.w);
        if (isLocalPlayer)
        {
            myUI          = GameObject.Find("UI").GetComponent <UIHandler>();
            myUI.playerUI = GetComponent <PlayerUI>();
            playerRpg     = GetComponent <PlayerRpg>();
            UpdatePlayerStats();
        }
        //Debug.Log(playerRpg.gameObject.name);

        lootables = new List <GameObject>();
    }
Exemplo n.º 9
0
 // Use this for initialization
 void Start()
 {
     Time.timeScale = 0f;
     rpg            = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerRpg>();
 }
Exemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     img = Resources.LoadAll <Sprite>("Graphics/Icons/EffectIcons");
     rpg = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerRpg>();
     Open();
 }
Exemplo n.º 11
0
 // Start is called before the first frame update
 void Start()
 {
     playerRpg          = inventory.GetPlayerRpg();
     defaultButtonColor = new Color32(36, 36, 36, 255);
 }
Exemplo n.º 12
0
 public static void DeserializePlayerRpg(SerialPlayerRpg serialPlayer, PlayerRpg player)
 {
     player.SetupSerializedValues(serialPlayer);
 }
Exemplo n.º 13
0
 // Start is called before the first frame update
 void Start()
 {
     anim      = GetComponent <Animator>();
     playerRpg = GetComponent <PlayerRpg>();
 }