51 lines
1.5 KiB
C#
51 lines
1.5 KiB
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using System;
|
||
|
|
||
|
public class SpecailBuff_Wall : SpecailBuff_Buildings
|
||
|
{
|
||
|
//[Header("所属建筑")]
|
||
|
//public Wall_Buildings barracks_Building;
|
||
|
// Start is called before the first frame update
|
||
|
public override void AddFunctionToTreeContoller()
|
||
|
{
|
||
|
Action Action1 = () =>
|
||
|
{
|
||
|
CreateTechItem(null, this.Wall_Buff_1, "团肉之墙", 300, 0, 0, true);
|
||
|
};
|
||
|
TreeControl.Instance.AddEvent("团肉之墙", Action1);
|
||
|
|
||
|
Action Action2 = () =>
|
||
|
{
|
||
|
BuildingTechItem bt3 = CreateTechItem(null, this.Wall_Buff_2, "加固", 300, 0, 0, false);
|
||
|
BuildingTechItem bt2 = CreateTechItem(bt3, this.Wall_Buff_2, "加固", 300, 0, 0, false);
|
||
|
BuildingTechItem bt1 = CreateTechItem(bt2, this.Wall_Buff_2, "加固", 300, 0, 0, true);
|
||
|
};
|
||
|
TreeControl.Instance.AddEvent("加固", Action2);
|
||
|
|
||
|
Action Action3 = () =>
|
||
|
{
|
||
|
CreateTechItem(null, this.Wall_Buff_3, "不死性", 300, 0, 0, true);
|
||
|
};
|
||
|
TreeControl.Instance.AddEvent("不死性", Action3);
|
||
|
}
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
public void Wall_Buff_1()
|
||
|
{
|
||
|
BattleManager.Instance.Add团肉之墙(10);
|
||
|
}
|
||
|
public void Wall_Buff_2()
|
||
|
{
|
||
|
BattleManager.Instance.Add加固(20);
|
||
|
}
|
||
|
public void Wall_Buff_3()
|
||
|
{
|
||
|
BattleManager.Instance.Add不死性(0.5f);
|
||
|
}
|
||
|
}
|