using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class App
{
public delegate void Del(string animeName);
//생성자
public App()
{
Hero hero = new Hero();
hero.onComplete = this.OnHeroAnimationComplete;
hero.PlayAnimation("Idle");
}
void OnHeroAnimationComplete(string animeName)
{
Console.WriteLine(animeName);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class Hero
{
public App.Del onComplete;
//생성자
public Hero()
{
}
public void PlayAnimation(string animeName)
{
this.onComplete(animeName);
}
}
}