Skip to content

Instantly share code, notes, and snippets.

@jezzye13
Created June 29, 2018 16:00
Show Gist options
  • Save jezzye13/184ddf035cd9451a7e758ddd3003e7d4 to your computer and use it in GitHub Desktop.
Save jezzye13/184ddf035cd9451a7e758ddd3003e7d4 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "ScriptableObjects/Character")]
public class ScriptableCharacterObject : ScriptableObject
{
[SerializeField]
private string UnitType;
[SerializeField]
private GameObject prefab;
[SerializeField]
private int Cost;
[SerializeField]
private float movementSpeed;
[SerializeField]
private float attackSpeed;
[SerializeField]
private float attackDamage;
[SerializeField]
private float health;
[SerializeField]
private string teamName;
public GameObject GetPrefab()
{
return prefab;
}
public float GetMovementSpeed()
{
return movementSpeed;
}
public float GetAttackSpeed()
{
return attackSpeed;
}
public float GetHealth()
{
return health;
}
public string GetTeamName()
{
return teamName;
}
public float GetAttackDamage()
{
return attackDamage;
}
public int SpawnCost()
{
return Cost;
}
public string TypeOunit()
{
return UnitType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment