-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AttackEvent, EventTypes, LifeBar and Attributes cloneable
- Implemented attack event in IsoUnityConnector. - EventTypes for move or attack. - LifeBar upside characters. - Attributes cloneable. Cloned when assigned.
- Loading branch information
Showing
21 changed files
with
390 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 3c453d041690ab642b6e517807c4ef31, type: 3} | ||
m_Name: AttackCell | ||
m_EditorClassIdentifier: | ||
realTexture: {fileID: 2800000, guid: 529a0dba784aea3468ca0b653c7849e4, type: 3} | ||
xCorner: 0 | ||
yCorner: 0 | ||
isXSimetric: 0 | ||
isYSimetric: 0 | ||
rotation: 0 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,34 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using System.Linq; | ||
|
||
public class CharacterScript : MonoBehaviour { | ||
|
||
private Vector2 pos; | ||
[SerializeField] | ||
public Character character; | ||
|
||
private void Start() | ||
{ | ||
|
||
} | ||
|
||
private void OnGUI() | ||
{ | ||
if (character != null && character.attributes.Any(x => x.id == "HP")) | ||
{ | ||
Attribute attribute = character.attributes.Find(x => x.id == "HP"); | ||
var renderer = gameObject.GetComponent<Renderer>(); | ||
float height = renderer.bounds.size.y * 15; | ||
pos = Camera.main.WorldToScreenPoint(transform.position); | ||
pos.y = Screen.height - pos.y - height; | ||
GUI.Box(new Rect(pos.x - 50, pos.y - 40, 100, 20), attribute.value + "/" + attribute.maxValue); | ||
} | ||
} | ||
|
||
void Update() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using UnityEngine; | ||
using System.Collections; | ||
|
||
public enum EventTypes{ | ||
ATTACK, | ||
MOVE | ||
}; |
Oops, something went wrong.