Esempio n. 1
0
    protected override void OnCollideToPlayer(ServerPlayer character, Vector2 point)
    {
        //When Hit My Player
        if (character)
        {
            if (owner == character.GetOwner())
                return;

            if (character.IsDead())
                return;

            character.Damage(damage, new NetworkMessageInfo());
            ImpactTarget(character.GetComponent<Rigidbody2D>(), impact);

            DestroyFromNetwork();
        }
    }