コード例 #1
0
ファイル: cup.cs プロジェクト: SunnyRx/popcorn
    void OnTriggerEnter(Collider other)
    {
        switch (other.tag)
        {
        case "PPC":
            ppc popcorn = other.GetComponent <ppc>();
            if (null != popcorn)
            {
                Debug.Log("Catch! ppcNum = " + popcorn.playerNum + " playerNum=" + playerNum);
                if (popcorn.playerNum == playerNum)
                {
                    FindObjectOfType <AudioManager>().Play("CoinCollect");
                    GameSystem.getInstance().setScore(popcorn.TakePopcorn());
                }
            }
            Destroy(other.gameObject);
            break;

        case "PROPS":
            props tmpProp = other.GetComponent <props> ();
            if (null != tmpProp)
            {
                FindObjectOfType <AudioManager>().Play("CoinCollect");
                tmpProp.TakePopcorn();
            }
            Destroy(other.gameObject);
            break;
        }
    }
コード例 #2
0
    public static T CustomProperty <T>(RoomInfo a, props p, T def = default(T))
    {
        var key = p.ToString();

        if (!a.customProperties.ContainsKey(key))
        {
            return(def);
        }
        return((T)a.customProperties[key]);
    }
コード例 #3
0
ファイル: Reflection.apix.cs プロジェクト: 0xCM/Meta.Core
 => dict(map(props(o), p => (p.Name, p.GetValue(o))));
コード例 #4
0
 new PfsBuilder(props, Console.WriteLine).WriteImage(outFile);