56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class Sacrifice_Buildings : Buildings
|
|
{
|
|
[Header("特有内容")]
|
|
public int Blood;
|
|
public bool isProducing = true;
|
|
public int BloodToFaithBuff = 1;
|
|
public int TuanziToBloodBuff = 1;
|
|
public BlobController BlobDragging;
|
|
public SacrificeArea SacrificeArea;
|
|
public override void AddResources_Click()
|
|
{
|
|
//GameProcedureManager.Instance.WoodCount = GameProcedureManager.Instance.WoodCount + Level * 5;
|
|
}
|
|
public override void AddResources_Auto()
|
|
{
|
|
|
|
if (Blood>0 && isProducing)
|
|
{
|
|
int subNum = (int)(GlobalBuffSystem.Instance.GlobalMultiplier * LocalBuff_Auto * TuanZi_efficiency * TuanZi_Num * (efficiency_Level_Auto[1] * SpecalBuffMuti_efficiency_Auto + SpecalBuffAdd_efficiency_Auto));
|
|
|
|
if (Blood >= subNum)
|
|
{
|
|
Blood -= subNum;
|
|
}
|
|
else
|
|
{
|
|
Blood = 0;
|
|
}
|
|
GameProcedureManager.Instance.FaithCount += 20*subNum;
|
|
}
|
|
}
|
|
public override void SpecalUpdate()
|
|
{
|
|
//TODO: UIbar相关还没同步
|
|
//information_Panel.transform.Find("Panel/ProgressBar").GetComponent<Slider>().value = Blood;
|
|
|
|
if (BlobDragging!=null&&!BlobDragging.isDragging)
|
|
{
|
|
Destroy(BlobDragging.gameObject);
|
|
BlobDragging = null;
|
|
Blood += TuanziToBloodBuff;
|
|
GetComponent<Animator>().Play("Sacrificing");
|
|
}
|
|
}
|
|
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
|
|
}
|
|
}
|