public override void Attach(LogicUnit g, LogicUnit t) { DebugUtils.Log(DebugUtils.Type.AI_AttributeEffect, string.Format("{0} {1} has been attached a {2} {3} {4} to {5} mark unit {6}", g.type, g.id, type, attributeAffectType, metaId, t.mark, t.id)); state = AttributeEffectState.StartRelease; giver = g; taker = t; // owner will always be taker... owner = taker; if (t.type == LogicUnitType.Soldier) { Soldier s = (Soldier)taker; ownerBuff = s.buffHandler; } else if (t.type == LogicUnitType.NPC) { Npc n = (Npc)taker; ownerBuff = n.buffHandler; } else if (t.type == LogicUnitType.Demolisher) { Demolisher d = (Demolisher)taker; ownerBuff = d.buffHandler; } else if (t.type == LogicUnitType.CrystalCar) { CrystalCar c = (CrystalCar)taker; ownerBuff = c.buffHandler; } else { DebugUtils.LogWarning(DebugUtils.Type.AI_AttributeEffect, string.Format("{0} {1} can't handle {2} now!", t.type, t.id, attributeAffectType)); } if (ownerBuff != null && effectResId != 0) { RenderMessage rm = new RenderMessage(); rm.type = RenderMessage.Type.AttachAttributeEffect; rm.ownerId = id; rm.arguments.Add("HolderType", (int)t.type); rm.arguments.Add("HolderId", t.id); rm.arguments.Add("resId", effectResId); rm.arguments.Add("bindPointName", effectBindPoint); PostRenderMessage(rm); } }
public DemolisherFsmWalk(Demolisher Demolisher) { owner = Demolisher; }
public DemolisherFsmChase(Demolisher car) { owner = car; }
public DemolisherFsmDying(Demolisher Demolisher) { owner = Demolisher; }
public DemolisherFsmDead(Demolisher Demolisher) { owner = Demolisher; }
public DemolisherFsmPlaceHolder(Demolisher car) { owner = car; }
public DemolisherFsmFight(Demolisher Demolisher) { owner = Demolisher; }
public DemolisherFsmIdle(Demolisher car) { owner = car; }