コード例 #1
0
 public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
 {
     if (bm.Actor != null)
     {
         DrunkInteractions.DoDrunkInteraction(bm.Actor);
     }
 }
コード例 #2
0
    public Weapon _weapon;//The controller of the gun
    #endregion

    #region the basic function of Monobehaviour
    void Awake()
    {
        _playerData  = new Data();
        _origin_data = new Data();
        _state       = new StayState(this);
        _buffs       = new BuffManager();
    }
コード例 #3
0
        public void InitCreature(BaseCreature creature, Location loc)
        {
            Template          = creature;
            EntityName        = Template.creatureName;
            Hash              = EntityManager.Instance.AddEntity(this);
            EntityBuffManager = new BuffManager(Hash);
            foreach (var buff in Template.buffs)
            {
                EntityBuffManager.AddBuff(new BuffHandler(Hash, Hash, buff.Hash));
            }
            m_spriteRenderer.sprite = Template.sprite;
            m_attribute             = Template.attribute;
            HealthPoints            = MaxHealthPoints;

            foreach (var skill in Template.skills)
            {
                SkillHashes.Add(skill.Hash);
            }
            NextCastSkillID = 0;

            //var h = EntitySprite.bounds.size.y;
            //hpBar.transform.localPosition += new Vector3(0, h, 0);

            hpBar.enabled             = false;
            mask_hpEffect.alphaCutoff = 1;
            mask_hp.alphaCutoff       = 1;
            MoveToTile(loc, 0, true);

            hpBar.enabled = true;
            CreatureHpChangeAnimation(MaxHealthPoints, MaxHealthPoints, 1);
        }
コード例 #4
0
    private void Laser()
    {
        if (targetEnemy != null)
        {
            //targetEnemy.TakeDamage(damageOverTime * Time.deltaTime);
            targetEnemy.TakeDamageByPercent(damageOverTime * Time.deltaTime);
            //targetEnemy.Slow(slowPercent);
            if (laserDubffCoroutin != null)
            {
                laserDubffCoroutin = StartCoroutine(BuffManager.ActiveBuff(targetEnemy, buffElementsMoveSlow));
            }
        }

        if (!lineRenderer.enabled)
        {
            lineRenderer.enabled = true;
            laserBeamImpactEffect.Play();
            laserBeamImpactLight.enabled = true;
        }

        lineRenderer.SetPosition(0, firePoint.position);
        lineRenderer.SetPosition(1, targetTransform.position);

        Vector3 dir = firePoint.position - targetTransform.position;

        laserBeamImpactEffect.transform.position = targetTransform.position + dir.normalized * 0.5f;
        laserBeamImpactEffect.transform.rotation = Quaternion.LookRotation(dir);
    }
コード例 #5
0
    // Use this for initialization
    void Start()
    {
        Player p = new Player();

        p.timerManager = tmanager;
        Data           = new BridgeData(p);
        bmanager       = new BuffManager(Data);

        var b = new Protection(bmanager, 10);

        b.AddEffect();
        b = new Protection(bmanager, 5);
        b.AddEffect();

        It1 t1 = p as It1;

        p.Reset();
        It2 t2 = p as It2;

        p.Reset();

        AtlasManager.Cache(new string[] { "test", "dd" });

        InvokeRepeating("t", 0, 1);
        // Invoke("tt",5);
    }
コード例 #6
0
ファイル: Pickup.cs プロジェクト: Tunsy/splatline-miami
 public void Start()
 {
     bm     = FindObjectOfType <BuffManager>();
     col    = GetComponent <BoxCollider2D>();
     sr     = GetComponent <SpriteRenderer>();
     canvas = FindObjectOfType <Canvas>();
 }
コード例 #7
0
 // 对象进入场景,在这里初始化各种数据, 资源, 模型等
 // 传入数据。
 virtual public void OnEnterWorld()
 {
     // todo: 这里会加入数据解析
     buffManager = new BuffManager(this);
     EventDispatcher.AddEventListener <GameObject, Vector3>(MogoMotor.ON_MOVE_TO, OnMoveTo);
     EventDispatcher.AddEventListener <GameObject, Vector3, float>(MogoMotor.ON_MOVE_TO_FALSE, OnMoveToFalse);
 }
コード例 #8
0
    // Start is called before the first frame update
    private IEnumerator Start()
    {
        instance = this;
        yield return(new WaitUntil(() => LoadManager.instance.isDataLoaded));

        BuffSetting();
    }
コード例 #9
0
        public override void OnAddition(BuffManager bm, BuffInstance bi, bool travelReaddition)
        {
            SimDescription         description  = bm.Actor.SimDescription;
            BuffInstanceAbductedEx buffInstance = bi as BuffInstanceAbductedEx;

            buffInstance.Abductee = bm.Actor;
            List <SimDescription> list = new List <SimDescription>();

            foreach (SimDescription current in Household.AlienHousehold.SimDescriptions)
            {
                if (current.TeenOrAbove)
                {
                    list.Add(current);
                }
            }

            if (list.Count > 0)
            {
                buffInstance.Alien = RandomUtil.GetRandomObjectFromList(list);

                if (AlienPregnancyProxy.ShouldImpregnate(buffInstance.Abductee, buffInstance.Alien))
                {
                    AlienPregnancyProxy.Start(buffInstance.Abductee, buffInstance.Alien);
                    buffInstance.IsAlienPregnant = true;
                    return;
                }
            }

            buffInstance.IsAlienPregnant = false;
        }
コード例 #10
0
ファイル: LiveMonster.cs プロジェクト: jayrulez/TOMClassic
        public bool BeHited(LiveMonster src)
        {
            int hitrate = SkillAssistant.GetHit(src, this);

            if (hitrate > MathTool.GetRandom(100))
            {
                HitDamage damage = SkillAssistant.GetDamage(src, this);
                CheckDamageBuffEffect(src, damage);

                HpBar.OnDamage(damage);
                SkillAssistant.CheckHitEffectAfter(src, this, damage);
                if (src.WeaponId > 0)
                {
                    src.Weapon.OnHit();
                }
                if (WeaponId > 0)
                {
                    Weapon.OnHited();
                }
                if (damage.Value > 0)
                {
                    BuffManager.CheckRecoverOnHit();
                    lastDamagerId  = src.Id;
                    peakDamagerLuk = Math.Max(peakDamagerLuk, src.RealLuk);
                }
                return(true);
            }
            return(false);
        }
コード例 #11
0
    public void Update()
    {
        if (cooldownTimer == 0f && casted)
        {
            //==================================================================================
            //Tutaj idzie efekt spella
            //==================================================================================
            emptyBuffSlotID = BuffManager.GetEmptySlot();
            if (emptyBuffSlotID != -1)
            {
                GameObject instantiateSpell = (GameObject)Instantiate(buff, transform.position, Quaternion.identity);
                instantiateSpell.transform.parent     = BuffManager.buffSlots[emptyBuffSlotID].transform;
                instantiateSpell.transform.position   = BuffManager.buffSlots[emptyBuffSlotID].transform.position;
                instantiateSpell.transform.localScale = new Vector3(1f, 1f, 1f);
            }
        }

        if (casted)
        {
            cooldownTimer           += Time.deltaTime;
            cooldownImage.fillAmount = (cooldown - cooldownTimer) / cooldown;
            if (cooldownTimer > cooldown)
            {
                casted                   = false;
                cooldownTimer            = 0f;
                cooldownImage.fillAmount = 0f;
            }
        }
    }
コード例 #12
0
        public override void Execute()
        {
            foreach (var entity in BuffManager.Entitys)
            {
                var buffs = BuffManager.GetBuffs <T>(entity);

                for (var i = 0; i < buffs.Count; i++)
                {
                    var buff = buffs[i];

                    if (buff.LastTriggerTime - buff.Duration >=
                        buff.TriggerInterval)
                    {
                        buff.LastTriggerTime = buff.Duration;

                        BuffManager.AddBuff(entity, new TDamageBuff()
                        {
                            Entity = buff.Entity,
                            Type   = buff.Type,
                            Value  = buff.Value,
                        });
                    }

                    BuffManager.SetBuffData(entity, buff, i);
                }
            }
        }
コード例 #13
0
        /// <summary>
        ///
        /// </summary>
        public override void Dispose()
        {
            Fight     = null;
            Team      = null;
            Cell      = null;
            Invocator = null;

            if (SpellManager != null)
            {
                SpellManager.Dispose();
                SpellManager = null;
            }
            if (StateManager != null)
            {
                StateManager.Dispose();
                StateManager = null;
            }
            if (BuffManager != null)
            {
                BuffManager.Dispose();
                BuffManager = null;
            }

            base.Dispose();
        }
コード例 #14
0
    public override void Execute(MinEventParams _params)
    {
        for (int i = 0; i < this.buffNames.Length; i++)
        {
            if (BuffManager.GetBuff(this.buffNames[i]) != null)
            {
                for (int j = 0; j < this.targets.Count; j++)
                {
                    Debug.Log(" Target: " + targets[j].EntityName + " Faction: " + targets[j].factionId);
                    Debug.Log(" Self: " + _params.Self.EntityName + " Faction: " + _params.Self.factionId);

                    // Check to make sure that the faction is the same
                    if (MustMatch)
                    {
                        if (this.targets[j].factionId == _params.Self.factionId)
                        {
                            this.targets[j].Buffs.AddBuff(this.buffNames[i], _params.Self.entityId, !_params.Self.isEntityRemote);
                        }
                    }
                    else
                    {
                        if (this.targets[j].factionId != _params.Self.factionId)
                        {
                            this.targets[j].Buffs.AddBuff(this.buffNames[i], _params.Self.entityId, !_params.Self.isEntityRemote);
                        }
                    }
                }
            }
        }
    }
コード例 #15
0
    IEnumerator hurtPlayer()
    {
        if (duration >= 0)
        {
            for (int i = 0; i < duration; i += frequency)
            {
                Player.damage(Mathf.RoundToInt(modifier));
                yield return(new WaitForSeconds(frequency));
            }
        }
        else
        {
            Player.damage(Mathf.RoundToInt(modifier));
            yield return(new WaitForSeconds(frequency));

            BuffManager.removeCurrentBuff(statName);
            setBuff(statName, statType, modifier, frequency, duration, target);
            if (!Player.isHeal)
            {
                Destroy(this.gameObject);
            }
            BuffManager.removeCurrentBuff(statName);
            Destroy(this.gameObject);
        }
    }
コード例 #16
0
ファイル: AbductedEx.cs プロジェクト: Duglarogg/Sims3
        public override void OnAddition(BuffManager bm, BuffInstance bi, bool travelReaddition)
        {
            BuffInstanceAbductedEx instance = bi as BuffInstanceAbductedEx;

            List <SimDescription> aliens = AlienUtilsEx.GetAliens(true);

            if (aliens == null)
            {
                return;
            }

            instance.Abductee     = bm.Actor;
            instance.Alien        = RandomUtil.GetRandomObjectFromList <SimDescription>(aliens);
            instance.IsAutonomous = false;

            if (CommonPregnancy.IsSuccess(instance.Abductee, instance.Alien))
            {
                Pregnancy pregnancy = CommonPregnancy.CreatePregnancy(instance.Abductee, instance.Alien, !CommonPregnancy.AllowPlantSimPregnancy());

                if (pregnancy != null)
                {
                    instance.IsAlienPregnancy = true;
                    instance.Abductee.SimDescription.Pregnancy = pregnancy;
                    EventTracker.SendEvent(EventTypeId.kGotPregnant, instance.Abductee);
                }
            }
        }
コード例 #17
0
        public override ActionResponse Handle()
        {
            BuffOption buff;

            if (buffType == "random")
            {
                buff = BuffManager.getRandomBuff(1)[0];
            }
            else
            {
                buff = BuffManager.getIDtoBuff(buffType);
            }

            if (buff == null)
            {
                BNC_Core.Logger.Log($"Could not find buff type of: {buffType}", StardewModdingAPI.LogLevel.Error);
                return(ActionResponse.Done);
            }
            else
            {
                //If not Default
                if (Duration != 1200 && Duration > 0 && Duration < 5000)
                {
                    buff.setDuration(Duration);
                }

                BuffManager.AddBuffToQueue(buff);
                return(ActionResponse.Done);
            }
        }
コード例 #18
0
        public override void Destroy(IEntity entity, IBuffDataComponent buff)
        {
            IDamageBuff damageBuff = (IDamageBuff)buff;

            BuffManager.GetBuffs(damageBuff.Maker, _fixedLifesteals);

            BuffManager.GetBuffs(damageBuff.Maker, _mechanicBuffs);

            if (_mechanicBuffs.Count < 1)
            {
                return;
            }

            var health    = _mechanicBuffs[0];
            var maxHealth = _mechanicBuffs[1];

            foreach (var fixedLifesteal in _fixedLifesteals)
            {
                if (fixedLifesteal is IBuffType buffType)
                {
                    if (damageBuff.Type != buffType.Type)
                    {
                        continue;
                    }
                }

                health.Value += fixedLifesteal.Value;

                if (health.Value > maxHealth.Value)
                {
                    health.Value = maxHealth.Value;
                }
            }
        }
コード例 #19
0
    public void _Execute(MinEventParams _params)
    {
        bool netSync  = !_params.Self.isEntityRemote | _params.IsLocal;
        int  entityId = _params.Self.entityId;

        for (int j = 0; j < this.targets.Count; j++)
        {
            string buff = "";
            if (this.targets[j] is EntityPlayer)
            {
                buff = this.buffNames[0];
            }
            else if (this.targets[j] is EntityZombie)
            {
                buff = this.buffNames[1];
            }
            else if (this.targets[j] is EntityAnimal)
            {
                buff = this.buffNames[2];
            }
            else
            {
                buff = this.buffNames[3];
            }
            if (BuffManager.GetBuff(buff) == null)
            {
                continue;
            }
            this.targets[j].Buffs.AddBuff(buff, entityId, netSync, false);
        }
    }
コード例 #20
0
    public Minion(MinionCard card)
    {
        Player      = card.Player;
        Card        = card;
        Card.Minion = this;

        CurrentAttack = card.CurrentAttack;
        BaseAttack    = card.BaseAttack;

        CurrentHealth = card.CurrentHealth;
        MaxHealth     = card.CurrentHealth;
        BaseHealth    = card.BaseHealth;

        HasTaunt        = card.HasTaunt;
        HasCharge       = card.HasCharge;
        HasPoison       = card.HasPoison;
        HasWindfury     = card.HasWindfury;
        HasDivineShield = card.HasDivineShield;
        IsElusive       = card.IsElusive;
        IsForgetful     = card.IsForgetful;
        IsStealth       = card.IsStealth;

        SpellPower = card.SpellPower;

        CurrentArmor = 0;

        Buffs = Card.Buffs;
    }
コード例 #21
0
 public override void Damage(Transform enemy)
 {
     base.Damage(enemy);
     // Dubuff_Burn
     StartCoroutine(BuffManager.ActiveBuff(enemy.gameObject.GetComponent <Enemy>(), buffElements_Burn));
     // Q. transform 에서 이렇게 enemy object를  가져오는게 괜찮은 방법인지..?
 }
コード例 #22
0
        public override void OnAddition(BuffManager bm, BuffInstance bi, bool travelReaddition)
        {
            BuffInstanceEWAllergies buffInstance = bi as BuffInstanceEWAllergies;

            buffInstance.mPlaguedSim = bm.Actor;
            buffInstance.DoSymptom();
        }
コード例 #23
0
ファイル: LiveMonster.cs プロジェクト: jayrulez/TOMClassic
        public void Next(float pastRound, bool tileMatching)//附带判断地形因素
        {
            roundPast++;
            pastRoundTotal += pastRound;

            HpBar.Update();
            SkillAssistant.CheckAuroState(this, tileMatching);

            if (pastRoundTotal >= 1)
            {
                pastRoundTotal -= 1;
                HpBar.OnRound();
                if (WeaponId > 0)
                {
                    Weapon.OnRound();
                }
            }

            BuffManager.BuffCount();

            if (SkillManager.CheckSpecial(pastRound))
            {
                return;//特殊技能触发
            }

            aiController.CheckAction();
        }
コード例 #24
0
ファイル: Effect_Buff.cs プロジェクト: flzzyf/GoticSoul
    public override void Trigger()
    {
        base.Trigger();

        if (buff == null)
        {
            Debug.LogError("未设置效果Buff:" + name);
        }

        if (number > 0)
        {
            //Debug.Log("添加Buff:" + buff.name);
            for (int i = 0; i < number; i++)
            {
                BuffManager.AddBuff(targetU, buff);
            }
        }
        else if (number < 0)
        {
            //Debug.Log("移除Buff:" + buff.name);
            for (int i = 0; i < Mathf.Abs(number); i++)
            {
                BuffManager.RemoveBuff(targetU, buff);
            }
        }
    }
コード例 #25
0
    private void Start()
    {
        Log.Assert(BuffManager.instance == null);

        BuffManager.instance = this;
        this.isInBuff        = false;
    }
コード例 #26
0
ファイル: RoleHead.cs プロジェクト: PenpenLi/BWM
    private void OnBuffChanged(BuffManager quests)
    {
        // 清空按钮
        for (int i = 0; i < listBtnBuff.Count; ++i)
        {
            Destroy(listBtnBuff[i].gameObject);
        }
        listBtnBuff.Clear();

        myBuff.gameObject.SetActive(true);
        myBuffRight.gameObject.SetActive(true);
        myBuffDown.gameObject.SetActive(true);

        var pos      = myBuff.transform.position;
        var posright = myBuffRight.transform.position;
        var posdown  = myBuffDown.transform.position;

        int     x      = 0;
        int     y      = 0;
        Vector3 curpos = pos;

        foreach (var t in BuffManager.Instance.buffers)
        {
            table.TableBuff tblbuff = Table.Query <table.TableBuff>().First(i => i.id == t.buffid && i.level == t.level);

            UIButton btn = (Instantiate(myBuff.gameObject, curpos, myBuff.transform.rotation) as GameObject).GetComponent <UIButton>();
            btn.transform.parent     = myBuff.transform.parent;
            btn.transform.localScale = myBuffDown.transform.localScale;
            btn.GetComponentInChildren <UISprite>().spriteName =
                btn.disabledSprite           =
                    btn.hoverSprite          =
                        btn.pressedSprite    =
                            btn.normalSprite =
                                btn != null ? tblbuff.icon : string.Empty;
            if (t.time == 0)
            {
                btn.GetComponentInChildren <UILabel>().text = "";
            }
            else
            {
                btn.GetComponentInChildren <UILabel>().text = t.lefttime.ToString();
            }
            listBtnBuff.Add(btn);

            x++;
            if (x >= 4)
            {
                x = 0;
                y++;
            }
            curpos    = pos;
            curpos.x += x * (posright.x - pos.x);
            curpos.y += y * (posdown.y - pos.y);
        }

        myBuff.gameObject.SetActive(false);
        myBuffRight.gameObject.SetActive(false);
        myBuffDown.gameObject.SetActive(false);
    }
コード例 #27
0
 private void Awake()
 {
     //初始化各个系统
     AbilManager.Init();
     BuffManager.Init();
     WeaponManager.Init();
     ItemManager.Init();
 }
コード例 #28
0
 private void Awake()
 {
     if (instance != null)
     {
         return;
     }
     instance = this;
 }
コード例 #29
0
 public override bool ShouldAdd(BuffManager bm, MoodAxis axisEffected, int moodValue)
 {
     if (bm.Actor.SimDescription.IsImmuneToAllergiesAndSickness())
     {
         return(false);
     }
     return(base.ShouldAdd(bm, axisEffected, moodValue));
 }
コード例 #30
0
 public override void Dispose(BuffManager bm)
 {
     if (mSymptomAlarm != AlarmHandle.kInvalidHandle)
     {
         bm.Actor.RemoveAlarm(mSymptomAlarm);
         mSymptomAlarm = AlarmHandle.kInvalidHandle;
     }
 }
コード例 #31
0
ファイル: RoleHead.cs プロジェクト: wuzhangwuzhang/BWM
    private void OnBuffChanged(BuffManager quests)
    {
        // 清空按钮
        for (int i = 0; i < listBtnBuff.Count; ++i)
            Destroy(listBtnBuff[i].gameObject);
        listBtnBuff.Clear();

        myBuff.gameObject.SetActive(true);
        myBuffRight.gameObject.SetActive(true);
        myBuffDown.gameObject.SetActive(true);

        var pos = myBuff.transform.position;
        var posright = myBuffRight.transform.position;
        var posdown = myBuffDown.transform.position;

        int x = 0;
        int y = 0;
        Vector3 curpos = pos;
        foreach (var t in BuffManager.Instance.buffers)
        {
            table.TableBuff tblbuff = Table.Query<table.TableBuff>().First(i => i.id == t.buffid && i.level == t.level);

            UIButton btn = (Instantiate(myBuff.gameObject, curpos, myBuff.transform.rotation) as GameObject).GetComponent<UIButton>();
            btn.transform.parent = myBuff.transform.parent;
            btn.transform.localScale = myBuffDown.transform.localScale;
            btn.GetComponentInChildren<UISprite>().spriteName =
                btn.disabledSprite =
                btn.hoverSprite =
                btn.pressedSprite =
                btn.normalSprite =
                btn != null ? tblbuff.icon : string.Empty;
            if (t.time == 0)
                btn.GetComponentInChildren<UILabel>().text = "";
            else
                btn.GetComponentInChildren<UILabel>().text = t.lefttime.ToString();
            listBtnBuff.Add(btn);

            x++;
            if (x >= 4)
            {
                x = 0;
                y++;
            }
            curpos = pos;
            curpos.x += x * (posright.x - pos.x);
            curpos.y += y * (posdown.y - pos.y);
        }

        myBuff.gameObject.SetActive(false);
        myBuffRight.gameObject.SetActive(false);
        myBuffDown.gameObject.SetActive(false);
    }
コード例 #32
0
ファイル: HangoverBuff.cs プロジェクト: Robobeurre/NRaas
            public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
            {
                if (bm.Actor.RabbitHoleCurrent != null)
                {
                    return;
                }
                if (bm.Actor.Occupation != null && bm.Actor.Occupation.IsAtWork)
                {
                    return;
                }
                InteractionInstance interactionInstance = bm.Actor.Autonomy.FindBestActionForCommodityOnLot(CommodityKind.RelieveNausea, bm.Actor.LotCurrent, AutonomySearchType.BuffAutoSolve);
                if (interactionInstance != null)
                {
                    interactionInstance.CancellableByPlayer = false;
                    interactionInstance.SetPriority(InteractionPriorityLevel.High);
                    bm.Actor.InteractionQueue.AddNext(interactionInstance);
                    return;
                }
                bm.Actor.InteractionQueue.AddNext(BuffNauseous.ThrowUpOutside.Singleton.CreateInstance(bm.Actor, bm.Actor, new InteractionPriority(InteractionPriorityLevel.High), false, false));
		
            }
コード例 #33
0
    protected virtual void Awake()
    {
        anim = GetComponentsInChildren<Animator>()[0];
        stateManager = new StateManager(this);
        buffManager = new BuffManager(this);
        stateManager.SetNeutralState();
        playerRigidbody = GetComponent<Rigidbody>();
        controllerInterface = new ControlInterface(playerNumber);

        moveSpeedMultiplier = 1f;
        hp = 100f;
        initialPosition = transform.position;
    }
コード例 #34
0
ファイル: EntityMercenary.cs プロジェクト: lbddk/ahzs-client
        // 对象进入场景,在这里初始化各种数据, 资源, 模型等
        // 传入数据。
        override public void OnEnterWorld()
        {
            // todo: 这里会加入数据解析
            buffManager = new BuffManager(this);
            skillManager = new SkillManager(this);
            battleManger = new MercenaryBattleManager(this, skillManager);
            sfxManager = new SfxManager(this);

            m_updateCoordTimerID = TimerHeap.AddTimer<bool>(1000, 1000, SyncPos, true);
            EventDispatcher.AddEventListener<GameObject, Vector3>(MogoMotor.ON_MOVE_TO, OnMoveTo);
            EventDispatcher.AddEventListener(Events.OtherEvent.CallTeammate, OnHelp);

            EventDispatcher.AddEventListener(Events.AIEvent.DummyThink, DummyThink);
            EventDispatcher.AddEventListener<GameObject>(Events.AIEvent.DummyStiffEnd, DummyStiffEnd);
            EventDispatcher.AddEventListener(Events.AIEvent.ProcessBossDie, ProcessBossDie);

            EventDispatcher.AddEventListener<byte, uint>(Events.AIEvent.SomeOneDie, ProcessSomeOneDie);//阵营,eid
            EventDispatcher.AddEventListener<uint, byte, uint, int>(Events.AIEvent.WarnOtherSpawnPointEntities, ProcessWarnOtherSpawnPointEntities);//eid, AIWarnEvent类型

            if (MogoWorld.theLittleGuyID == ID)
            {
                isLittleGuy = true;
            }
        }
コード例 #35
0
ファイル: EntityDummy.cs プロジェクト: lbddk/ahzs-client
        // 对象进入场景,在这里初始化各种数据, 资源, 模型等
        // 传入数据。
        override public void OnEnterWorld()
        {
            // todo: 这里会加入数据解析
            buffManager = new BuffManager(this);
            skillManager = new SkillManager(this);
            battleManger = new DummyBattleManager(this, skillManager);
            sfxManager = new SfxManager(this);

            //AddUniqEventListener<GameObject, Vector3>(Events.OtherEvent.OnMoveTo, OnMoveTo);
            EventDispatcher.AddEventListener<GameObject, Vector3>(MogoMotor.ON_MOVE_TO, OnMoveTo);
            EventDispatcher.AddEventListener(Events.OtherEvent.CallTeammate, OnHelp);

            EventDispatcher.AddEventListener(Events.AIEvent.DummyThink, DummyThink);
            EventDispatcher.AddEventListener<GameObject>(Events.AIEvent.DummyStiffEnd, DummyStiffEnd);
            EventDispatcher.AddEventListener(Events.AIEvent.ProcessBossDie, ProcessBossDie);

            EventDispatcher.AddEventListener<byte, uint>(Events.AIEvent.SomeOneDie, ProcessSomeOneDie);//阵营,eid
            EventDispatcher.AddEventListener<uint, byte, uint, int>(Events.AIEvent.WarnOtherSpawnPointEntities, ProcessWarnOtherSpawnPointEntities);//eid, AIWarnEvent类型

            EventDispatcher.AddEventListener<uint, int, int, int>(Events.GearEvent.Damage, SetDamage);
        }
コード例 #36
0
ファイル: BuffManager.cs プロジェクト: wuzhangwuzhang/BWM
	static BuffManager() { Instance = new BuffManager(); }
コード例 #37
0
ファイル: DrunkBuff.cs プロジェクト: Robobeurre/NRaas
 public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
 {
     bm.AddElement(DrinkingBuffs.sHangover, Origin.FromJuice);
 }
コード例 #38
0
ファイル: DrunkBuff.cs プロジェクト: Robobeurre/NRaas
 public override void OnTimeout(BuffManager bm, BuffInstance bi, Buff.OnTimeoutReasons reason)
 {
     if (bm.Actor != null)
         DrunkInteractions.DoDrunkInteraction(bm.Actor);
 }