public override void trigger(Dictionary <string, object> args) { unitControler[] tragets = (unitControler[])args["tragets"]; if (!(bool)args["miss"]) { //BasicControler traget = (BasicControler)args["tragets"]; //Debug.Log("traget:"+traget); //Debug.Log("traget type:" + (args["tragets"].GetType())); foreach (unitControler traget in tragets) { BasicControler nowTraget = (BasicControler)traget; //Debug.Log("製造傷害時傷害數值為:" + damage.num); Debug.Log("traget 為:" + ((BasicControler)traget).gameObject.name); traget.takeDamage(createDamage(args)); //Debug.Log("冷卻時間:" + CoolDown); //Debug.Log("自身位置:" + transform.position + "相對位置:" + transform.TransformDirection(offset)); GameObject effobj = Instantiate(objectList.main.prafebList[19], nowTraget.transform); effobj.transform.localPosition = Vector2.zero; Dictionary <string, object> buffArgs = new Dictionary <string, object>(); buffArgs["time"] = 3.0f; buffArgs["layer"] = 1; buffArgs["creater"] = owner; nowTraget.addBuff("buff_palsy", buffArgs); } } else { BasicControler traget = (BasicControler)tragets[0]; NumberCreater.main.CreateMissing(traget.transform.position); } setTime(args); }
public override void trigger(Dictionary <string, object> args) { unitControler[] tragets = (unitControler[])args["tragets"]; if (tragets == null) { return; } foreach (unitControler traget in tragets) { BasicControler nowTraget = (BasicControler)traget; Dictionary <string, object> buff_arg = new Dictionary <string, object>(); buff_arg["num"] = (int)(SHIELD_NUMBER * ((BasicControler)owner).data.Now_Mag_Multiple); //Debug.LogWarning("arg[num]設置為:" + buff_arg["num"]); buff_arg["time"] = 4 * unitData.STAND_ATK_INTERVAL; buff_arg["creater"] = owner; nowTraget.addBuff("buff_flameShield", buff_arg); //Debug.LogWarning("加上buff_flameShield"); } setTime(args); }