コード例 #1
0
        public void Sample()
        {
            var numbers = new ExpandableList();
            numbers.Add(1);
            numbers.Add(2);

            Expect(numbers.Elements, Is.EquivalentTo(new[] {1, 2}));
        }
コード例 #2
0
        public void Sample()
        {
            var numbers = new ExpandableList();

            numbers.Add(1);
            numbers.Add(2);

            Expect(numbers.Elements, Is.EquivalentTo(new[] { 1, 2 }));
        }
コード例 #3
0
ファイル: Character.cs プロジェクト: Grumpy-Kat/The100FanGame
    public Friendship GetFriendship(string charName)
    {
        for (int i = 0; i < friendships.Count(); i++)
        {
            if (friendships.Get(i).character1.characterName == charName)
            {
                return(friendships.Get(i));
            }
            if (friendships.Get(i).character2.characterName == charName)
            {
                return(friendships.Get(i));
            }
        }
        Character otherCharacter = GameObject.Find(charName).GetComponent <Character>();

        friendships.Add(new Friendship(this, otherCharacter, 0));
        otherCharacter.AddFriendship(friendships.Get(friendships.Count() - 1));
        return(friendships.Get(friendships.Count() - 1));
    }