public void spawnBallistaObject()
    {
        if (!spawned && otc.getPlayStatus())
        {
            if (otc.isPlayerHoster())
            {
                ballistaTag = "BallistaP1";
                isHoster    = true;
            }
            else if (otc.isPlayerResolver())
            {
                ballistaTag = "BallistaP2";
            }
            else
            {
                Debug.Log("Player is neither hoster or resolver");
            }

            Pose anchorPose;
            bool didHit = FindPointOnPlane(out anchorPose);
            if (didHit)
            {
                //it went inside here
                //parent everything to the worldanchorTransform
                // when instantiating the transform is global.
                ASL.ASLHelper.InstanitateASLObject("BallistaObject", Vector3.zero,
                                                   Quaternion.identity, GetComponent <ASL.ASLObject>().m_Id,
                                                   GetType().Namespace + GetType().Name, "CreatedBallistaObject");

                Debug.Log("Ballista Parent m_id is: " + GetComponent <ASL.ASLObject>().m_Id);
                spawned = true;
                matc.setPlayerTag();
            }
        }
    }
Example #2
0
    void doUpdate()
    {
        if (otc.getPlayStatus())
        {
            if (this.enabled == false)
            {
                this.enabled = true;
            }

            float score = gs.getScore();
            txt.text = score.ToString("F2");
        }
        if (gs.getScore() == 5.0f)
        {
            txt.text = "YOU WON!";
        }
    }