playerinfo script and duplicate scene for testing

This commit is contained in:
joonasp
2022-04-08 22:16:25 +03:00
parent 9eaa6517c3
commit 037432c393
14 changed files with 36785 additions and 666 deletions

View File

@@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerInfo : MonoBehaviour
{
private int health;
private int essence_basic;
//Add elemental essences?
private void Awake()
{
health = 5;
essence_basic = 0;
}
public void AddHealth(int value)
{
health += value;
if (health <= 0)
{
Debug.Log("NO HEALTH REMAINING");
}
}
public void AddEssenceBasic(int value)
{
if (essence_basic + value < 0)
{
Debug.LogError("NOT ENOUGH ESSENCE");
}
else essence_basic += value;
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 08f72f5d017837743b67d344a6a7ed52
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: