Inheritance: MonoBehaviour
Example #1
0
    void Start()
    {
        ExitGames.Client.Photon.PhotonPeer.RegisterType(typeof(BookPropertySet), 0x10, BookPropertySet.Serialize, BookPropertySet.Deserialize);

        pView  = GetComponent <PhotonView> ();
        bProps = GetComponent <BookProperties> ();

//     bProps.props.filename = "/tmp/9.2 (55).pdf";

        bookData = null;
        base.Start();
    }
        public static IDocumentProperties SetDocumentProperties(string documentType)
        {
            IDocumentProperties result = null;
            switch (documentType)
            {
                case Constants.DocumentType.Book:
                    result = new BookProperties();
                    break;
            }

            return result;
        }
Example #3
0
        public static IDocumentProperties SetDocumentProperties(string documentType)
        {
            IDocumentProperties result = null;

            switch (documentType)
            {
            case Constants.DocumentType.Book:
                result = new BookProperties();
                break;
            }

            return(result);
        }
Example #4
0
    // A response when clicking on the book itself. Replace the book with an full book object.
    public void makeNetBook(ControlInput controller, ControlInput.ControllerDescription controllerObject, GameObject button, GameObject avatar, bool initialize = false)
    {
        if (!initialize)
        {
            Debug.Log("making book");
            GameObject     book = PhotonNetwork.Instantiate(netbookTemplate.name, new Vector3(0, 2, 3), Quaternion.identity, 0);
            BookProperties bps  = book.GetComponent <BookProperties> ();
            bps.props.filename = "This filename";
            bps.props.title    = "Book title";
//       BookManager bookManager = book.GetComponent <BookManager> ();
// //       StartCoroutine (bookManager.loadBook (fname, props));
//       bookManager.loadBook (fname, props);
//       Debug.Log ("Loading book " + fname);
//       book.GetComponent <BookMenuInteraction> ().pickupBook (controller, controllerObject, button, avatar);
//       Destroy (button.transform.parent.gameObject);
        }
    }
Example #5
0
    void OnTriggerEnter(Collider other)
    //void OnCollisionEnter(Collision collision)
    {
        if (other.gameObject.GetComponentInParent <BookProperties> () != null)
        {
            Debug.Log("Collide " + other.gameObject.name);
            BookProperties bps = other.gameObject.GetComponentInParent <BookProperties> ();
            Destroy(other.gameObject.GetComponentInParent <BookProperties> ().gameObject);

            Debug.Log("making book");
            GameObject book = PhotonNetwork.Instantiate(netbookTemplate.name, new Vector3(0, 2, 3), Quaternion.identity, 0);
            book.GetComponent <BookProperties> ().props = bps.props;
//       bps.props.filename = "This filename";
//       bps.props.title = "Book title";
        }
//       if (canCollide && (collision.gameObject.GetComponent <TrolleyManager> () != null))
//       {
//         Debug.Log ("Handing to trolley");
//
// // TODO : replace with remove all handlers.
//       if (collision.gameObject.GetComponent <TrolleyManager> ().addBook (this.gameObject.GetComponent <BookProperties> ().props))
//       {
//         if (currentMoveController != null)
//         {
//                currentMoveController.removeHandler (bookMove, currentMoveControllerObj);
//         }
//         if (currentRetrieveController != null)
//         {
//                currentRetrieveController.removeHandler (bookRetrieve, currentRetrieveControllerObj);
//         }
//         if (currentRotateController != null)
//         {
//                currentRotateController.removeHandler (bookRotate, currentRotateControllerObj);
//         }
//         hideMenu ();
//         Destroy (this.gameObject);
//       }
//       }
//
    }
Example #6
0
        /// <summary>
        /// This should be called after any postback and/or before any save.  due to how we can delete mid-row
        /// in the UI, properties are only soft-deleted and need to be physically removed here.
        /// </summary>
        public void CleanDeletedAndEmptyProperties()
        {
            StringProperties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            IntProperties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            Int64Properties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            DoubleProperties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            BoolProperties?.RemoveAll(x => x == null || x.Deleted);
            DidProperties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            IidProperties?.RemoveAll(x => x == null || x.Deleted || x.Value == null);
            Spells?.RemoveAll(x => x == null || x.Deleted);
            BookProperties?.RemoveAll(x => x == null || x.Deleted);
            Positions?.RemoveAll(x => x == null || x.Deleted);
            EmoteTable.ForEach(es => es.Emotes.RemoveAll(x => x == null || x.Deleted));
            EmoteTable?.RemoveAll(x => x == null || x.Deleted);
            BodyParts?.RemoveAll(x => x == null || x.Deleted);
            GeneratorTable?.RemoveAll(x => x == null || x.Deleted);
            CreateList?.RemoveAll(x => x == null || x.Deleted);
            Skills.RemoveAll(x => x == null || x.Deleted);

            if (!HasAbilities)
            {
                Abilities = null;
            }
        }