コード例 #1
0
        private void CritProc(object sender, AttackCritEventArgs e)
        {
            if (e.CriticalMultiplier > _critMultiplier)
            {
                return;
            }

            if (_proc.Proc())
            {
                e.CriticalMultiplier = _critMultiplier;
            }
        }
コード例 #2
0
ファイル: Necromancy.cs プロジェクト: moto2002/BoEG
        private void KilledEntityCallback(KillEventArgs args)
        {
            //Should we check for errors in the KillEventArgs?
            //No, we should assume it is working and check for errors if something is wrong
            if (_necromancyProc.Proc())
            {
                var location = args.Target.transform.position;

                var spawned = AbiltiyUtility.Spawn(location, _skeletonPrefab, 1);
                foreach (var spawn in spawned)
                {
                    var teamable = spawn.GetComponent <ITeamable>();
                    teamable.SetTeam(_teamable.Team);
                }
            }
        }