//想尝试把伤害数值的图片单独做一个状态机,再嵌套回主的boss战斗状态机,but... public void Bossdamage(ref FireCD fireCD)//想把造成伤害们的图片状态单独拿出来,好停留的时间长一点。。但是不知道放哪。。一直不对。。。。 //ref Firebird firebird, ref Orochi orochi, ref PosionAD posionAD, ref PosionCD posionCD, ref FireAD fireAD, { damageTime += Time.deltaTime; if (damageTime < 2.0f) { fireCD.image.color = new Color(1, 1, 1, 1.0f); } if (damageTime > 3.0f) { fireCD.image.color = new Color(1, 1, 1, 0.0f); } damageTime = 0; }
void Start() { orochi = new Orochi() { Attack = 10, HP = 1500, Cridamage = 20 }; firebird = new Firebird() { Attack = 15, HP = 1200, Cridamage = 45 }; poison = new Poison() { image = imgpoison, speed = 100.0f }; fire = new Fire() { image = imgfire, speed = 100.0f }; posionAD = new PosionAD() { image = imgposionAD }; posionCD = new PosionCD() { image = imgpoisonCD }; fireAD = new FireAD() { image = imgfireAD }; fireCD = new FireCD() { image = imgfireCD }; sword = new Sword() { image = imgsword, speed = 60.0f }; wow = new Wow() { image = imgwow }; wscreen = new Wscreen() { image = imgwscreen, speed = 1.0f }; }