您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
42 行
1.0 KiB
42 行
1.0 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
|
|
namespace UnityRoyale
|
|
{
|
|
//Base class for all objects that can be placed on the play area: units, obstacles, structures, etc.
|
|
public class Placeable : MonoBehaviour
|
|
{
|
|
public PlaceableType pType;
|
|
|
|
[HideInInspector] public Faction faction;
|
|
[HideInInspector] public PlaceableTarget targetType; //TODO: move to ThinkingPlaceable?
|
|
[HideInInspector] public AudioClip dieAudioClip;
|
|
|
|
public UnityAction<Placeable> OnDie;
|
|
|
|
public enum PlaceableType
|
|
{
|
|
Unit,
|
|
Obstacle,
|
|
Building,
|
|
Spell,
|
|
Castle, //special type of building
|
|
}
|
|
|
|
public enum PlaceableTarget
|
|
{
|
|
OnlyBuildings,
|
|
Both,
|
|
None,
|
|
}
|
|
|
|
public enum Faction
|
|
{
|
|
Player, //Red
|
|
Opponent, //Blue
|
|
None,
|
|
}
|
|
}
|
|
}
|