Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     this.gameManager  = GameObject.FindObjectOfType <LuggageManager>();
     render            = this.gameObject.GetComponent <SpriteRenderer>();
     hoverColor        = Color.cyan;
     this.wardroveDoor = this.gameObject.GetComponent <Wardrove>();
 }
        public EditLuggage(LuggageManager manager, Luggage l)
        {
            InitializeComponent();
            luggageManager = manager;
            luggage        = l;
            List <LuggageStatus> status      = luggageManager.RetrieveAllLuggageStatus();
            List <string>        statusNames = new List <string>();

            foreach (var name in status)
            {
                statusNames.Add(name.LuggageStatusID);
            }
            cboStatus.ItemsSource = statusNames;
            if (l.Status.Equals("In Lobby"))
            {
                cboStatus.SelectedIndex = 0;
            }
            else if (l.Status.Equals("In Room"))
            {
                cboStatus.SelectedIndex = 1;
            }
            else
            {
                cboStatus.SelectedIndex = 2;
            }
        }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     this.gameManager = GameObject.FindObjectOfType <LuggageManager>();
     render           = gameObject.GetComponent <SpriteRenderer>();
     CloseDoor();
     EnableColliders(false);
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     initialPos       = this.transform.localPosition;
     initialScale     = this.transform.localScale;
     this.gameManager = GameObject.FindObjectOfType <LuggageManager>();
     render           = gameObject.GetComponent <SpriteRenderer>();
     CloseDoor();
     EnableColliders(false);
 }
        public AddLuggage(LuggageManager luggageManager, GuestManager guestManager)
        {
            InitializeComponent();
            this.luggageManager = luggageManager;
            this.guestManager   = guestManager;
            List <LuggageStatus> status = null;

            try
            {
                status = luggageManager.RetrieveAllLuggageStatus();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            List <string> statusNames = new List <string>();

            if (status != null)
            {
                foreach (var s in status)
                {
                    statusNames.Add(s.LuggageStatusID);
                }
            }

            cboStatus.ItemsSource   = statusNames;
            cboStatus.SelectedIndex = 0;
            List <Guest> guests = null;

            try
            {
                guests = guestManager.ReadAllGuests();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            List <int> guestIDs = new List <int>();

            if (guests != null)
            {
                foreach (var g in guests)
                {
                    guestIDs.Add(g.GuestID);
                }
            }

            cboGuest.ItemsSource   = guestIDs;
            cboGuest.SelectedIndex = 0;
        }
Ejemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        this.gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <LuggageManager>();

        this.representation = new GameObject[this.targets.Length];

        // Getting the childs and hiding them
        for (int i = 0; i < this.representation.Length; i++)
        {
            this.representation[i] = this.transform.GetChild(i).gameObject;
            this.representation[i].SetActive(false);
        }

        InitializeTargets();
    }
Ejemplo n.º 7
0
 private void Start()
 {
     this.gameManager = GameObject.FindObjectOfType <LuggageManager>();
     this.panel.SetActive(false);
 }