Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public DemolisherFsmWalk(Demolisher Demolisher)
 {
     owner = Demolisher;
 }
Ejemplo n.º 3
0
 public DemolisherFsmChase(Demolisher car)
 {
     owner = car;
 }
Ejemplo n.º 4
0
 public DemolisherFsmDying(Demolisher Demolisher)
 {
     owner = Demolisher;
 }
Ejemplo n.º 5
0
 public DemolisherFsmDead(Demolisher Demolisher)
 {
     owner = Demolisher;
 }
 public DemolisherFsmPlaceHolder(Demolisher car)
 {
     owner = car;
 }
Ejemplo n.º 7
0
 public DemolisherFsmFight(Demolisher Demolisher)
 {
     owner = Demolisher;
 }
Ejemplo n.º 8
0
 public DemolisherFsmIdle(Demolisher car)
 {
     owner = car;
 }