Log() private method

private Log ( UnityEngine context, string message ) : void
context UnityEngine
message string
return void
コード例 #1
0
 public void log(string channel, string msg)
 {
     if (!enable)
     {
         return;
     }
     if (blackList.Contains(channel))
     {
         return;
     }
     if (channel == "Debug")
     {
         UberDebug.Log((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg);
     }
     else if (channel == "Warning")
     {
         UberDebug.LogWarning((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg);
     }
     else if (channel == "Error")
     {
         UberDebug.LogError((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg);
     }
     else
     {
         UberDebug.LogChannel(channel, (string.IsNullOrEmpty(name) ? null : (name + ":")) + msg);
     }
 }
コード例 #2
0
        void onSortMethodChange(int id)
        {
            UberDebug.Log($"Sort method change: {id}");
            sortMethod = (SortMethod)id;

            onSortChange?.Invoke();
        }
コード例 #3
0
 public void log(string msg)
 {
     if (!enable)
     {
         return;
     }
     UberDebug.Log((string.IsNullOrEmpty(name) ? null : (name + ":")) + msg);
 }
コード例 #4
0
 public void log(string msg)
 {
     if (!enable)
     {
         return;
     }
     UberDebug.Log(msg);
 }
コード例 #5
0
 void TestThreadEntry()
 {
     for (;;)
     {
         Debug.Log("Thread Log Message");
         UberDebug.Log("Thread ULog Message");
         Thread.Sleep(100);
     }
 }
コード例 #6
0
        static bool Prefix(RulePartySkillCheck __instance, bool isTrigger, ref int ___m_D20, ref int ___m_StatValue, StatType ___m_StatType, int ___m_DifficultyClass)
        {
            ___m_StatValue = int.MinValue;
            var tr = Harmony12.Traverse.Create(__instance);

            tr.Property("Roller").SetValue(null);
            RuleSkillCheck selected_evt = null;

            foreach (UnitEntityData unitEntityData in Game.Instance.Player.Party)
            {
                if (unitEntityData.Descriptor.State.CanAct)
                {
                    ModifiableValue stat = unitEntityData.Stats.GetStat(___m_StatType);
                    ModifiableValueAttributeStat valueAttributeStat = stat as ModifiableValueAttributeStat;
                    int            num = valueAttributeStat != null ? valueAttributeStat.Bonus : stat.ModifiedValue;
                    RuleSkillCheck evt = new RuleSkillCheck(unitEntityData, ___m_StatType, ___m_DifficultyClass)
                    {
                        Voice         = __instance.Voice,
                        EnsureSuccess = __instance.EnsureSuccess
                    };

                    if (isTrigger)
                    {
                        evt.Silent = true;;
                        Rulebook.Trigger <RuleSkillCheck>(evt);
                        num += (int)evt.Bonus;
                    }

                    if (___m_StatValue < num)
                    {
                        ___m_StatValue = num;
                        tr.Property("Roller").SetValue(unitEntityData);
                        selected_evt = evt;
                    }
                }
            }
            if (__instance.Roller == null)
            {
                UberDebug.Log("Roller is null, in the party skillcheck", (object[])Array.Empty <object>());
            }
            else
            {
                if (!isTrigger)
                {
                    selected_evt.Calculate();
                }
                else
                {
                    selected_evt.Silent = false;
                    EventBus.RaiseEvent <IRollSkillCheckHandler>((Action <IRollSkillCheckHandler>)(h => h.HandleOnRuleSkillCheck(selected_evt)));
                    //Game.Instance?.UI?.BattleLogManager?.HandleUnitSkillCheckRolled(selected_evt);
                }
                ___m_D20 = selected_evt.D20;
            }
            return(false);
        }
コード例 #7
0
        private List <ILevelUpAction> ApplyLevelup(UnitDescriptor unitDescriptor)
        {
            this.State = new LevelUpState(unitDescriptor, this.State.Mode);
            List <ILevelUpAction> list = new List <ILevelUpAction>();

            foreach (ILevelUpAction levelUpAction in this.LevelUpActions)
            {
                if (!levelUpAction.Check(this.State, unitDescriptor))
                {
                    UberDebug.Log("Invalid action: " + levelUpAction, Array.Empty <object>());
                }
                else
                {
                    list.Add(levelUpAction);
                    levelUpAction.Apply(this.State, unitDescriptor);
                    this.State.OnApplyAction();
                }
            }
            unitDescriptor.Progression.ReapplyFeaturesOnLevelUp();
            this.LevelUpActions.Clear();
            return(list);
        }
コード例 #8
0
    public void DoTest()
    {
        // UnityEngine.Debug.Log("Starting");
        Debug.LogWarning("Log Warning with GameObject", gameObject);
        Debug.LogError("Log Error with GameObject", gameObject);
        Debug.Log("Log Message with GameObject", gameObject);
        Debug.LogFormat("Log Format param {0}", "Test");
        Debug.LogFormat(gameObject, "Log Format with GameObject and param {0}", "Test");

        UberDebug.Log("ULog");
        UberDebug.Log("ULog with param {0}", "Test");
        UberDebug.Log(gameObject, "ULog with GameObject");
        UberDebug.Log(gameObject, "ULog with GameObject and param {0}", "Test");

        UberDebug.LogChannel("Test", "ULogChannel");
        UberDebug.LogChannel("Test", "ULogChannel with param {0}", "Test");
        UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject");
        UberDebug.LogChannel(gameObject, "Test", "ULogChannel with GameObject and param {0}", "Test");

        UberDebug.LogWarning("ULogWarning");
        UberDebug.LogWarning("ULogWarning with param {0}", "Test");
        UberDebug.LogWarning(gameObject, "ULogWarning with GameObject");
        UberDebug.LogWarning(gameObject, "ULogWarning with GameObject and param {0}", "Test");

        UberDebug.LogWarningChannel("Test", "ULogWarningChannel");
        UberDebug.LogWarningChannel("Test", "ULogWarningChannel with param {0}", "Test");
        UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject");
        UberDebug.LogWarningChannel(gameObject, "Test", "ULogWarningChannel with GameObject and param {0}", "Test");

        UberDebug.LogError("ULogError");
        UberDebug.LogError("ULogError with param {0}", "Test");
        UberDebug.LogError(gameObject, "ULogError with GameObject");
        UberDebug.LogError(gameObject, "ULogError with GameObject and param {0}", "Test");

        UberDebug.LogErrorChannel("Test", "ULogErrorChannel");
        UberDebug.LogErrorChannel("Test", "ULogErrorChannel with param {0}", "Test");
        UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject");
        UberDebug.LogErrorChannel(gameObject, "Test", "ULogErrorChannel with GameObject and param {0}", "Test");
    }
コード例 #9
0
    public override void Init()
    {
        base.Init();
        GFLauncher.OnFixUpdate = FixUpdate;
        RegisterAction("defaultAdd", OnMsg_GetData);
        for (int i = 0; i < m_TextContents.Length; i++)
        {
            m_TextContents[i] = tf_Round.Find(string.Format("Text{0}", i)).GetComponent <Text>();
        }

        this.btn_More.onClick.AddListener(() =>
        {
            Debugger.Log("点击了More按钮");
        });

        this.btn_Back.onClick.AddListener(() =>
        {
            this.Close();
            ScreenViewManager.Inst.MainLayer.BeginNavTo("main");
        });

        this.btn_Start.onClick.AddListener(() =>
        {
            //if (coroutine != -1)
            //    IEnumeratorTool.StopCoroutine(coroutine);
            //reset();
            isStart = true;
            //coroutine = IEnumeratorTool.StartCoroutine(startCountDown());
            if (deltT != 0 && deltT < t)
            {
                UberDebug.Log("小主,点击过快,手下留情!!!");
                return;
            }
            v0 = Random.Range(5f, 12f);
            a  = Random.Range(-1f, -3f);
            t  = (vt - v0) / a;
            UberDebug.Log(string.Format("<color=yellow>v0:{0} a:{1} rotateTime:{2}</color>", v0, a, t));
        });
    }
コード例 #10
0
 public void log(string channel, string msg)
 {
     if (!enable)
     {
         return;
     }
     if (channel == "Debug")
     {
         UberDebug.Log(msg);
     }
     else if (channel == "Warning")
     {
         UberDebug.LogWarning(msg);
     }
     else if (channel == "Error")
     {
         UberDebug.LogError(msg);
     }
     else
     {
         UberDebug.LogChannel(channel, msg);
     }
 }
コード例 #11
0
            public static IEnumerator <AbilityDeliveryTarget> Deliver(AbilityExecutionContext context, TargetWrapper targetWrapper)
            {
                UnitEntityData target = targetWrapper.Unit;

                if (target == null)
                {
                    UberDebug.LogError("Target unit is missing");
                    yield break;
                }

                UnitEntityData caster = context.Caster;

                if (caster.GetThreatHand() == null)
                {
                    UberDebug.LogError("Invalid caster's weapon");
                    yield break;
                }

                UnitMovementAgent agentASP = caster.View.AgentASP;

                caster.View.StopMoving();
                agentASP.IsCharging = true;
                agentASP.ForcePath(new ForcedPath(new List <Vector3> {
                    caster.Position, target.Position
                }));
                caster.Descriptor.State.IsCharging = true;
                caster.Descriptor.AddBuff(BlueprintRoot.Instance.SystemMechanics.ChargeBuff, context, 1.Rounds().Seconds);
                UnitAttack unitAttack = new UnitAttack(target);

                unitAttack.Init(caster);

                float timeSinceStart = 0f;

                while (unitAttack.ShouldUnitApproach)
                {
                    timeSinceStart += Game.Instance.TimeController.GameDeltaTime;
                    if (timeSinceStart > 6f)
                    {
                        UberDebug.Log("Charge: timeSinceStart > 6f");
                        yield break;
                    }
                    else if (caster.GetThreatHand() == null)
                    {
                        UberDebug.Log("Charge: caster.GetThreatHand() == null");
                        yield break;
                    }
                    else if (!caster.Descriptor.State.CanMove)
                    {
                        UberDebug.Log("Charge: !caster.Descriptor.State.CanMove");
                        yield break;
                    }
                    else if (!(bool)agentASP)
                    {
                        UberDebug.Log("Charge: !(bool)caster.View.AgentASP");
                        yield break;
                    }
                    else if (!agentASP.IsReallyMoving)
                    {
                        agentASP.ForcePath(new ForcedPath(new List <Vector3> {
                            caster.Position, target.Position
                        }));
                        if (!agentASP.IsReallyMoving)
                        {
                            UberDebug.Log("Charge: !caster.View.AgentASP.IsReallyMoving");
                            yield break;
                        }
                    }

                    agentASP.MaxSpeedOverride = Math.Max(agentASP.MaxSpeedOverride ?? 0f, caster.CombatSpeedMps * 2f);
                    yield return(null);
                }

                caster.View.StopMoving();
                unitAttack.IgnoreCooldown(null);
                unitAttack.IsCharge = true;
                caster.Commands.AddToQueueFirst(unitAttack);
            }
コード例 #12
0
 public static void log(string message, params object[] par)
 {
     UberDebug.Log(preprocessMessage(message), par);
 }
コード例 #13
0
 public static void log(UnityEngine.Object context, string message, params object[] par)
 {
     UberDebug.Log(context, preprocessMessage(message), par);
 }
コード例 #14
0
 public async System.Threading.Tasks.Task SufferDamagePre(DamageInfo damageInfo)
 {
     UberDebug.Log("准备遭受攻击");
 }