コード例 #1
0
        public bool IsWinningAgainst(ChemicalElementEntity main, ChemicalElementEntity other)
        {
            int couple             = (int)(main.type | other.type);
            IntToChemicalData data = this.winners.Find(x => x.couple == couple);

            if (data.couple > 0)
            {
                return(data.type == main.type);
            }
            else
            {
                Debug.LogWarning($"WARNING : This couple ({main} + {other}) is not yet registered ! Check it out !");
                return(false);
            }
        }
コード例 #2
0
        public string GetMixOf(ChemicalElementEntity a, ChemicalElementEntity b)
        {
            int couple             = (int)(a.type | b.type);
            IntToChemicalData data = this.couples.Find(x => x.couple == couple);

            if (data.couple > 0)
            {
                if (data.empty)
                {
                    return(null);
                }
                this.stringBuilder.Clear();
                this.stringBuilder.Append("Interactive.Engine.").Append(data.type.ToString());
                return(this.stringBuilder.ToString());
            }
            else
            {
                Debug.LogWarning($"WARNING : This couple ({a} + {b}) is not yet registered ! Check it out !");
                return(voiddString);
            }
        }