コード例 #1
0
        /// <summary>
        /// Attempts to send damage to the specified entity; use if you have the LiveEntity UID
        /// </summary>
        public virtual bool TrySendDmg(ulong id, int nType, int nDmg, bool nDirect)
        {
            LiveEntity ent = TryGetEnt(id);

            if (ent == null)
            {
                return(false);
            }

            return(ent.TakeDmg(null, nType, nDmg, nDirect));
        }
コード例 #2
0
        /// <summary>
        /// Attempts to send damage to the specified entity; use if you only have the GameObject of the target
        /// </summary>
        public virtual bool TrySendDmg(GameObject target, LiveEntity src, int nType, int nDmg, bool nDirect)
        {
            if (target == null)
            {
                return(false);
            }

            LiveEntity ent = TryGetEnt(target);

            if (ent == null)
            {
                return(false);
            }

            return(ent.TakeDmg(src, nType, nDmg, nDirect));
        }