Ejemplo n.º 1
0
    public void Awake()
    {
        _name  = "PROLogicX";
        _level = 1;

        playerClass = PlayerClass.Warrior;
        playerState = PlayerState.Normal;

        _exp                 = 0;
        _levelModifier       = 1.05f;
        _expToLevel          = 100;
        _alive               = true;
        _waitingToExitCombat = false;
        _canFight            = true;
        _attributes          = new Attribute[Enum.GetValues(typeof(AttributeName)).Length];
        _vitals              = new Vital[Enum.GetValues(typeof(VitalName)).Length];



        if (globalPrefabs == null)
        {
            globalPrefabs = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GlobalPrefabs>();
        }

        SetupStats();
        SetupVitals();
    }
Ejemplo n.º 2
0
    private void CreateSceneItemsList()
    {
        foreach (DeserializedLevels.Item deserializedItem in GetCurrentLevel().items)
        {
            string prefabName = deserializedItem.prefab;

            // if the prefab in the item XmlNode has not been loaded then add it to the prefabPool
            if (!prefabPool.ContainsKey(prefabName))
            {
                GameObject prefabObject = GlobalPrefabs.GetPrefab(prefabName);

                if (prefabObject == null)
                {
                    // If we couldn't find the object, break out and continue the loop
                    continue;
                }

                prefabPool.Add(prefabName, prefabObject);
            }

            ItemStruct item = new ItemStruct(prefabPool[prefabName], deserializedItem);

            sceneItemsList.Add(item);
        }
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        playerNew = GetComponent <PlayerNew>();

        if (globalPrefabs == null)
        {
            globalPrefabs = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GlobalPrefabs>();
        }

        startRespawn = true;        //Will start respawn if needed
    }
Ejemplo n.º 4
0
    void Start()
    {
        if (_pc == null)
        {
            _pc = GetComponent <PlayerNew>();
        }

        if (globalPrefabs == null)
        {
            globalPrefabs = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GlobalPrefabs>();
        }
    }
    void Start()
    {
        GlobalPrefabs.LoadAll("Characters");
        GlobalPrefabs.LoadAll("Environment");
        GlobalPrefabs.LoadAll("Game Dynamics");

        DeserializedLevelsLoader deserializedLevelsLoader = new DeserializedLevelsLoader();

        deserializedLevelsLoader.GenerateItems();

        DontDestroyOnLoad(this);
    }
Ejemplo n.º 6
0
    void Start()
    {
        if (player == null)
        {
            player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerNew>();
        }

        if (globalPrefabs == null)
        {
            globalPrefabs = GameObject.FindGameObjectWithTag("GameMaster").GetComponent <GlobalPrefabs>();
        }

        OriginalAttacksPerSecond = AttacksPerSecond;
    }
Ejemplo n.º 7
0
 // Use this for initialization
 void Start()
 {
     mainGame = GameLogicGameObject.GetComponent<WeedGame>();
     globalPrefabs = GameLogicGameObject.GetComponent<GlobalPrefabs>();
 }
Ejemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     stationedTrucks = new Truck[maxTruckAmount];
     globalPrefabs = GameObject.FindGameObjectWithTag("GameLogic").GetComponent<GlobalPrefabs>();
 }