Пример #1
0
        protected override MyMwcObjectBuilder_Base GetObjectBuilderInternal(bool getExactCopy)
        {
            MyMwcObjectBuilder_PrefabBankNode objectBuilder = base.GetObjectBuilderInternal(getExactCopy) as MyMwcObjectBuilder_PrefabBankNode;

            objectBuilder.Cash          = Cash;
            objectBuilder.UseProperties = UseProperties.GetObjectBuilder();

            return(objectBuilder);
        }
Пример #2
0
        protected override void InitPrefab(string displayName, Vector3 relativePosition, Matrix localOrientation, MyMwcObjectBuilder_PrefabBase objectBuilder, MyPrefabConfiguration prefabConfig)
        {
            MyMwcObjectBuilder_PrefabBankNode objectBuilderBankNode = objectBuilder as MyMwcObjectBuilder_PrefabBankNode;

            Cash          = objectBuilderBankNode.Cash;
            UseProperties = new MyUseProperties(MyUseType.None, MyUseType.Solo);
            if (objectBuilderBankNode.UseProperties == null)
            {
                UseProperties.Init(MyUseType.None, MyUseType.Solo, 3, 4000, false);
            }
            else
            {
                UseProperties.Init(objectBuilderBankNode.UseProperties);
            }
            // some default cash for testing
            if (!UseProperties.IsHacked)
            {
                Cash = 8000f;
            }
        }