Ejemplo n.º 1
0
 public void HandleKick(KickEvent kickEvent)
 {
     foreach (var handler in internalHandlers)
     {
         handler.HandleKick(kickEvent);
     }
 }
Ejemplo n.º 2
0
        public void Kick(Player player)
        {
            int days = GameRandom.Current.Next(1, 4);

            KickEvent? .Invoke(this, new DogBiteEventArgs ( player, days ));

            player.AddBuff(new DogBitedBuff(player));

            Expire( );
        }
Ejemplo n.º 3
0
        private IrcEvent ParseKick(UserData sender, EntityData target, string[] param, string text)
        {
            var target_u = Entities.GetUser(param[1]);

            // Export before deleting data
            var ev = new KickEvent((User)sender, (Channel)target, (User)target_u, text);
            if (target_u.isclient)
                Entities.DropChannel((ChannelData)target);
            else
                Entities.Unjoin((ChannelData)target, target_u);
            return ev;
        }
Ejemplo n.º 4
0
    public virtual bool Kick(Vector2 vector)
    {
        KickEvent result = GetEventSystem <KickEvent>().CallListners(new KickEvent(gameObject, vector));

        if (result.IsCancel || result.Vector.Equals(Vector2.zero))
        {
            return(false);
        }

        GetComponent <Rigidbody2D>().AddForce(vector);
        return(true);
    }
Ejemplo n.º 5
0
        public void parseEventTest()
        {
            string eventLine = string.Empty;
            DateTime dt = new DateTime();
            int i = 1;
            LogEvent actual;
            LogEvent expected;
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.IsNull(actual, "Empty event line returned non-null item");

            eventLine = "00:00:05 - *DEAD* [Tequila_Rising_CCC] yeah lost pony speed advantage on the hill";
            expected = new ChatEvent(eventLine, ++i, "Tequila_Rising_CCC");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "ChatEvent parsed incorrectly");

            eventLine = "23:59:45 - TLB_Pleep started a poll to kick player Diesel.";
            expected = new KickEvent(eventLine, ++i, "TLB_Pleep");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "KickEvent parsed incorrectly");

            eventLine = "00:00:00 - Bodyguard_of_Prophetess <img=ico_spear> lockermoker";
            expected = new KillEvent(eventLine, ++i, "Bodyguard_of_Prophetess", "lockermoker");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "KillEvent parsed incorrectly");

            eventLine = "23:58:45 - sirzosh77 has joined the game with ID: 417914";
            expected = new LoginEvent(eventLine, ++i, "sirzosh77", "417914");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "LoginEvent parsed incorrectly");

            eventLine = "23:44:07 - zarcov started a poll to change map to Nord Town and factions to Sarranid Sultanate and Kingdom of Rhodoks.";
            expected = new MapPollEvent(eventLine, ++i, "zarcov");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "MapPollEvent parsed incorrectly");

            eventLine = "19:13:26 - lucas123456789 is banned permanently by Wappaw_Redknight.";
            expected = new PermaBanEvent(eventLine, ++i, "lucas123456789");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "PermaBanEvent parsed incorrectly");

            eventLine = "17:12:50 - El~Fisto is banned temporarily.";
            expected = new TmpBanEvent(eventLine, ++i, "El~Fisto");
            actual = LogParser.parseEvent(dt, eventLine);
            Assert.AreEqual(expected, actual, "TmpBanEvent parsed incorrectly");
        }
Ejemplo n.º 6
0
 public override void HandleKick(KickEvent ev)
 {
     Bind(ev.Kickee);
     Bind(ev.Kicker);
 }
Ejemplo n.º 7
0
    /// <summary>
    /// 初期化
    /// </summary>
    public void Initialize()
    {
        //  移動可能フラグ
        isMove = true;

        //  回転可能フラグ
        isRotation = true;

        //  攻撃可能フラグ
        isAttack = false;

        //  無敵フラグ
        isInvisible = false;

        //  初期位置の記憶
        resetPos = modelObject.transform.position;

        //  ポイント
        point = 0;

        //  コントローラーの設定
        gamePad = MyInputManager.GetController(useControllerIndex);

        //  アウトラインマテリアルの設定
        SetOutlineColor();

        //  蹴り
        KickEvent inst = modelObject.AddComponent <KickEvent>();

        inst.Init(animator);

        //  キック時の攻撃トリガーを入れる関数
        Action kickStartFunc = () =>
        {
            //  攻撃のトリガー
            isAttack = true;
            #region DEBUG
            #if UNITY_EDITOR
            //  デバッグ用
            isDrawAttackTrigger = true;
            #endif
            #endregion
        };

        inst.SetKickStartFunc(kickStartFunc);

        //  キック時の攻撃トリガーを切る関数
        Action kickEndFunc = () =>
        {
            AttackTrgOff();
        };

        inst.SetKickEndFunc(kickEndFunc);

        //  攻撃時に発生するボイス
        Action kickVoiceFunc = () =>
        {
            KickVoice();
        };

        inst.SetKickVoiceFunc(kickVoiceFunc);

        //  注視処理
        Vector3 targetPos = Camera.main.transform.position;

        lookAtTargetIK.SetTargetPosition(targetPos);
        lookAtTargetIK.SetLookAtWeight(1.0f, 0.0f, 0.45f, 0.0f, 0.5f);
    }
Ejemplo n.º 8
0
        public override void HandleKick(KickEvent ev)
        {
            var message = $"{ev.Kickee} was kicked by {ev.Kicker.Nickname} from {ev.Channel} ({ev.Reason})";

            DisplayEvent(message, ev.Kicker, ev.Channel);
        }
Ejemplo n.º 9
0
 public virtual void HandleKick(KickEvent ev)
 {
 }