Beispiel #1
0
        private void build(string id)
        {
            Name                     = allInstruments[id].Name;
            description              = allInstruments[id].description;
            texture                  = allInstruments[id].texture;
            animation                = allInstruments[id].animation;
            readyToPlay              = true;
            cooldownTime             = 60;
            numAttachmentSlots.Value = 1;
            attachments.SetCount(numAttachmentSlots);
            InstantUse   = true;
            instrumentID = id;

            if (allAdditionalSaveData == null)
            {
                allAdditionalSaveData = new Dictionary <string, string>();
            }
        }
        private void build(string id)
        {
            name                     = allInstruments[id].name;
            description              = allInstruments[id].description;
            texture                  = allInstruments[id].texture;
            animation                = allInstruments[id].animation;
            readyToPlay              = true;
            cooldownTime             = 60;
            numAttachmentSlots       = 1;
            attachments              = new SObject[numAttachmentSlots];
            owned                    = true;
            allInstruments[id].owned = true;
            instantUse               = true;
            instrumentID             = id;

            if (allAdditionalSaveData == null)
            {
                allAdditionalSaveData = new Dictionary <string, string>();
            }
        }
Beispiel #3
0
        public Instrument(string id, Texture2D texture, string name, string description, IInstrumentAnimation animation)
        {
            if (allInstruments == null)
            {
                allInstruments = new Dictionary <string, Instrument>();
            }

            this.animation   = animation;
            this.Name        = name;
            displayName      = name;
            this.description = description;
            this.texture     = texture;
            instrumentID     = id;

            if (allInstruments.ContainsKey(id))
            {
                allInstruments.Remove(id);
            }

            allInstruments.Add(id, this);
        }