static void Main(string[] args) { NPC1 npc1 = new NPC1(); NPC2 npc2 = new NPC2(); npc1.Heal += Show_Message; npc1.Attack += Show_Message; npc2.Heal += Show_Message; npc2.Attack += Show_Message; npc1.MinusHealth(20); npc1.MinusHealth(60); npc1.PlusHealth(400); npc1.MinusHealth(200); npc1.MinusHealth(20); npc1.PlusHealth(40); npc1.Stat(); WriteLine(); npc2.MinusHealth(90); npc2.PlusHealth(20); npc2.MinusHealth(50); npc2.PlusHealth(80); npc2.PlusHealth(20); npc2.PlusHealth(50); npc2.MinusHealth(30); npc2.Stat(); WriteLine(); Func <string> editor; new StringEdit("И наиболее используемыми, с которыми часто приходится сталкиваться, являются Action, Predicate и Func."); editor = StringEdit.DeletingPunctuationMarks; editor += StringEdit.ToLowerCase; editor += StringEdit.NumberAdding; editor += StringEdit.SpaceDeleting; editor += StringEdit.ToUpperCase; Operation(editor); WriteLine($"Окнончательный результат: {StringEdit.str}"); }
public SliceOfLife1(Danmaku danmaku, MainObject mainObject) : base(danmaku, mainObject) { npc1 = new NPC1(danmaku, new Vector2f(500, -100), new Vector2f(50, 50), 25, int.MaxValue / 60); AddNPC(npc1); }
private void Awake() { rb = GetComponent <Rigidbody2D>(); npc = GameObject.FindGameObjectWithTag("NPC_1").GetComponent <NPC1>(); }