Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions TechwiseRPGProject/Assets/BattleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 931262000}
m_CullTransparentMesh: 1

--- !u!1 &983920093
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1842,6 +1843,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 983920093}
m_CullTransparentMesh: 1

--- !u!1 &1006717342
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2241,6 +2243,7 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

--- !u!1 &1441465007
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2321,6 +2324,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1441465007}
m_CullTransparentMesh: 1

--- !u!1 &1453590945
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3263,9 +3267,11 @@ MonoBehaviour:
enemyPrefab: {fileID: 450787236531585063, guid: a3638cc1ee8a83f4384beb4e1e7553df, type: 3}
playerBattleStation: {fileID: 1603094194}
enemyBattleStation: {fileID: 931262001}

dialogueText: {fileID: 1940569261}
playerHUD: {fileID: 1502352558}
enemyHUD: {fileID: 2060209615}

state: 0
--- !u!1 &1741474783
GameObject:
Expand Down Expand Up @@ -4688,6 +4694,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2060209611}
m_CullTransparentMesh: 1

--- !u!114 &2060209615
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -4703,6 +4710,7 @@ MonoBehaviour:
nameText: {fileID: 1441465009}
levelText: {fileID: 0}
hpSlider: {fileID: 1941842035}

--- !u!1 &2078868587
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -4732,8 +4740,10 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0

m_Children:
- {fileID: 1940569260}

m_Father: {fileID: 1453590949}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down
2 changes: 2 additions & 0 deletions TechwiseRPGProject/Assets/Enemies/EnemyData/evilDummy.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9e978ae8cd0fe364a9944d43db2ea4cc, type: 3}
m_Name:
m_EditorClassIdentifier:

unitName: Sinister Square
unitLevel: 666
damage: 30
maxHp: 4
currentHp: 4

--- !u!1 &3557481600862146149
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using UnityEngine.UI;

public enum BattleState { START, PLAYERTURN, ENEMYTURN, VICTORY, DEFEAT } //list of phases


public class BattleSystem : MonoBehaviour
{
public GameObject playerPrefab;
Expand All @@ -13,6 +15,7 @@ public class BattleSystem : MonoBehaviour
public Transform playerBattleStation;
public Transform enemyBattleStation;


Unit playerUnit;
Unit enemyUnit;

Expand Down Expand Up @@ -104,6 +107,7 @@ public void OnAttackButton(){

StartCoroutine(PlayerAttack());


}


Expand Down
4 changes: 4 additions & 0 deletions TechwiseRPGProject/Assets/Enemies/battleScripts/Unit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using System.Collections.Generic;
using UnityEngine;


public class Unit : MonoBehaviour //variable fields for each unit

{
public string unitName;
public int unitLevel;
Expand All @@ -12,6 +14,7 @@
public int maxHp;
public int currentHp;


public bool TakeDamage(int dmg) {
currentHp -= dmg;

Expand All @@ -22,5 +25,6 @@ public bool TakeDamage(int dmg) {


}


}