Ejemplo n.º 1
0
    void Start()
    {
        Cursor.lockState = CursorLockMode.Locked;

        slimeStock            = 0;
        currentLife           = initialLife;
        healthUI.maxValue     = initialLife;
        slimeStockUI.maxValue = 5;
        audioSource           = GetComponent <AudioSource>();
        damaged          = GetComponent <InvuDamage>();
        physicController = GetComponent <EnhancedPhysicController>();
        RefreshScale();
        var movementsInputs = inputs.FindActionMap("SlimeActions");

        movementsInputs.Enable();
        movementsInputs["LaunchSlime"].performed += OnLaunchSlime;

        slimeStockUI.value = slimeStock;
        healthUI.value     = currentLife;
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     collider = GetComponent <Collider>();
     damaged  = GetComponent <InvuDamage>();
     NewLife();
 }