客观存在(即数据类)
我们先定义一个壳子, 就叫Existence吧
using UnityEngine;
using System.Collections;
public class Existence : MonoBehaviour {
public static int TYPE_SKILL = 1; // 技能
public static int TYPE_EFFECT = 2; // 效果
public static int TYPE_GIFT = 3; // 奖励
public static int TYPE_COURSE = 4; // 进度
protected int type = 0; // 类型
protected void Awake() {
}
public virtual int getType() {
return type;
}
// 做一些事情(循环执行,类似心跳)
public virtual void doThing(float time, params GameObject[] objs) {
}
}
接着,让我们写技能,技能的话,这里主要指可以释放的技能效果,就是控制技能的生,伤害,死等。
具体如下:
- 释放时间
- 释放地点
- 持续时间
弃耕!!!!!!!!!!!!!!!!!!!!!!!!!!!!