using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// 所有子弹的接口。
/// </summary>
public interface Test
{
void SetDamage(int damage);
int GetDamage();
void Fire(Transform target);
}
public class Testtttttttt : MonoBehaviour, Test
{
Transform target;
int damage = 1;
public void Fire(Transform target)
{
this.target = target;
}
public int GetDamage()
{
return damage;
}
public void SetDamage(int damage)
{
this.damage = damage;
}
}
最后
以上就是慈祥黄蜂最近收集整理的关于关于 public interface{} 接口的设置的全部内容,更多相关关于内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复