コード例 #1
0
ファイル: UnitEvents.cs プロジェクト: SilentGamzee/Evolo.Mine
        public static void OnKilling(AbstractGameObject from, GameUnit target)
        {
            if (target.itemDrop.Length > 0)
            {
                Player owner = null;
                if (from != null)
                {
                    owner = from.Owner;
                }
                SpecialActions.SpawnItem(target.itemDrop, target.CurrentPos, owner);
            }

            if (target.IsMy())
            {
                // var myUnits = CreatureGroupManager.GetAllByPlayer(PlayersManager.GetMyPlayer());
                // var myBuildings = BuildingsGroupManager.GetAllByPlayer(PlayersManager.GetMyPlayer());
            }


            target.GroupObj.OnDeath(target, from);
        }