示例#1
0
    public void onTouch()
    {
        // tell parent we have been selected
        DiceInHandController doc = this.transform.parent.GetComponent <DiceInHandController> ();

        doc.selectNumberOfDice(rollNumber);
    }
    // Use this for initialization
    void Start()
    {
        // find DICE IN HAND and set the crew

        GameObject           dobject     = transform.Find("DiceInHand").gameObject;
        DiceInHandController dcontroller = dobject.GetComponent <DiceInHandController>();

        dcontroller.Crew = theCrew;

        // health tracker gets a link to crew too
        dobject = transform.Find("HealthTracker").gameObject;
        HealthTracker hcontroller = dobject.GetComponent <HealthTracker> ();

        hcontroller.Crew = theCrew;

        // find the provisions control and set the crew
        dobject = transform.Find("ProvisionsController").gameObject;
        ProvisionsViewController provs = dobject.GetComponent <ProvisionsViewController> ();

        provs.theCrew = theCrew;

        // time tracker
        dobject = transform.Find("TimeDisplay").gameObject;
        TimeDisplayController times = dobject.GetComponent <TimeDisplayController> ();

        times.theCrew = theCrew;
    }
示例#3
0
    void onTouch()
    {
        // switch states if possible

        if (model.dieState != edieState.locked)
        {
//			SpriteRenderer renderer = selection.GetComponent<SpriteRenderer>();

            model.switchSelect();

            DiceInHandController parento = this.GetComponentInParent <DiceInHandController> ();
            parento.selectUnselectDie(this);

            displayDie();
        }
    }