Exemplo n.º 1
0
    private void Init()
    {
        // write here code to be called on component initialization

        maxHealth = PropLib.LoadValue(node, "HealthProp", "MaxHealth").Float;
        var shouldUseHealth = PropLib.LoadValue(node, "HealthProp", "ShouldUseHealth").Int;

        if (shouldUseHealth == 1)
        {
            health = PropLib.LoadValue(node, "HealthProp", "Health").Float;
        }
        else
        {
            health = maxHealth;
        }

        isAlive = true;
    }
Exemplo n.º 2
0
    private void Init()
    {
        // write here code to be called on component initialization
        worldTrigger = node.GetChild(0) as WorldTrigger;
        debugSphere  = node.GetChild(1);
        var result = PropLib.LoadValue(node, "SpawnPointProp", "Index");

        if (result == null)
        {
            Log.Message($"SpawnPointComponent can not find value from SpawnPointProp for Index");
            return;
        }

        Index = result.Int;
        if (worldTrigger == null)
        {
            Log.Message($"Node: {node.Name} can not find PhysicalTrigger inside SpawnPointComponent\n");
        }
        else
        {
            worldTrigger.AddEnterCallback(EnterCallback);
        }
    }
Exemplo n.º 3
0
 private void LoadVariables()
 {
     Damage         = PropLib.LoadValue(node, "BonfireProp", "Damage").Float;
     TicksPerMinute = PropLib.LoadValue(node, "BonfireProp", "TicksPerMinute").Float;
 }