using Core.Utilities;
|
/*using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using System.Security.Policy;
|
using TowerDefense.Economy;*/
|
using UnityEngine;
|
|
/// <summary>
|
/// 这种派生出来的Singleton如果要起作用,必须要Add Compoment到场景内的某一个Entity上。
|
/// </summary>
|
public class SingleTonCls : Singleton<SingleTonCls>
|
{
|
public string mySingleString = "fuckzzj";
|
|
|
/// <summary>
|
/// 用于测试 Unity3D 的Add Compoment功能
|
/// </summary>
|
public Vector3 vec3Test;
|
|
/// <summary>
|
/// TEST CODE 用于测试确认细节
|
/// </summary>
|
public ChildCls testChildCls;
|
|
/// <summary>
|
/// 这种是关于delegate相关的代码,是不会在Unity的Spector面板中显示出来的,测试一下效果。
|
/// </summary>
|
public FilterTest myTestFilter;
|
|
public static int myIntValue { get; set;}
|
|
// Start is called before the first frame update
|
void Start()
|
{
|
|
}
|
|
// Update is called once per frame
|
void Update()
|
{
|
|
}
|
|
public string getString()
|
{
|
if (this.testChildCls != null)
|
return this.testChildCls.getString();
|
if( this.myTestFilter != null)
|
{
|
if( this.myTestFilter())
|
{
|
return "hello,fuckying";
|
}
|
else
|
{
|
return "hello,fuckzz";
|
}
|
}
|
else
|
return this.mySingleString;
|
}
|
|
/// <summary>
|
/// 测试一个delegate相关的Filter代码
|
/// </summary>
|
/// <returns></returns>
|
public delegate bool FilterTest();
|
}
|