Example #1
0
 private void Start()
 {
     actor    = GetComponent <ActorBoard>();
     coord    = GetComponent <ConvertCoordinates>();
     getUI    = FindObjects.GetUIObject;
     getActor = FindObjects.GetStaticActor;
 }
Example #2
0
        private void Start()
        {
            gameColor = FindObjects.GameLogic.GetComponent <GameColor>();
            coord     = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
            actor     = FindObjects.GameLogic.GetComponent <ActorBoard>();

            getActor = FindObjects.GetStaticActor;
        }
Example #3
0
        public void SeedPlayerData()
        {
            StaticActor actor = new StaticActor {
                IsPlayer = true
            };

            DataCollection.Players.DataType = DataType.None;
            DataCollection.Players.Add("1", actor);
        }
Example #4
0
        /// <summary>
        /// Wrapper around Billboard for use as a menu item in the add item menu.
        /// For groups you should leave name, typeName and makeActorfn null.
        /// </summary>
        /// <param name="parent">Pie selector that holds this item.</param>
        /// <param name="name">Friendly (localized) name of element.  Used to add a label.  If the label is already embedded in the texture then set this to null.</param>
        /// <param name="typeName">Type name without the "Boku.".  Used for help system.</param>
        /// <param name="textureFilename">Texture2D tile to display of pie slice.</param>
        /// <param name="makeActorFn">Delegate which creates a new actor of this type.</param>
        /// <param name="size">Size to display texture on slice.</param>
        /// <param name="radialOffset">Offset away from center for texture on slice.</param>
        public ActorMenuItem(Object parent, string name, string textureFilename, StaticActor staticActor, Vector2 size, float radialOffset)
            : base(parent, textureFilename, size)
        {
            this.name        = name;
            this.staticActor = staticActor;

            // We need the 0.5 offset in z to put the billboard on top of the pie slice.
            localTransform.Translation = new Vector3(radialOffset, 0, 0.5f);
            localTransform.Compose();
        }   // end of ActorMenuItem c'tor
Example #5
0
        private void Start()
        {
            schedule = FindObjects.GameLogic.GetComponent <SchedulingSystem>();
            progress = FindObjects.GameLogic.GetComponent <DungeonProgress>();
            progressData
                       = FindObjects.GameLogic.GetComponent <DungeonProgressData>();
            color      = FindObjects.GameLogic.GetComponent <GameColor>();
            modeline   = FindObjects.GameLogic.GetComponent <UIModeline>();
            message    = FindObjects.GameLogic.GetComponent <UIMessage>();
            actorData  = FindObjects.GameLogic.GetComponent <ActorData>();
            potionData = FindObjects.GameLogic.GetComponent <PotionData>();
            coord      = FindObjects.GameLogic.GetComponent <ConvertCoordinates>();
            fungus     = FindObjects.GameLogic.GetComponent <NourishFungus>();
            text       = FindObjects.GameLogic.GetComponent <GameText>();

            getActor = FindObjects.GetStaticActor;
        }
        public SharedIdle(
            string classificationName,
            BaseChassis chassis,
            GetModelInstance getModelInstance,
            StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            if (XmlActorParams.SharedIdleData != null)
            {
                sharedAnim = new SharedAnimation(XmlActorParams.SharedIdleData.ActiveAnimationName);
            }
            else
            {
                sharedAnim = new SharedAnimation("");
            }

            fbxSRO = getModelInstance() as FBXModel;
            Debug.Assert(fbxSRO != null, "Wrong model type?");
        }
Example #7
0
        }   // RegisterInCardSpace()

        static public NamedFilter RegisterInCardSpace(string userDefinedName, string nonLocalizedName)
        {
            // Do we already have a filter with this name?
            // If so, don't try and add a new one.
            string filterUPID = "filter.named." + userDefinedName + "." + nonLocalizedName;
            Filter f;

            CardSpace.Cards.FilterDict.TryGetValue(filterUPID, out f);
            if (f != null)
            {
                return(f as NamedFilter);
            }

            NamedFilter namedFilter = new NamedFilter(userDefinedName, nonLocalizedName);

            CardSpace.Cards.FilterDict.Add(namedFilter.upid, namedFilter);

            // Look for a filter tile matching this actor's default name. If found, use its icon for this creatable tile.
            StaticActor actor      = ActorManager.GetActor(nonLocalizedName);
            string      filterName = actor.MenuTextureFile;
            string      iconName;
            Filter      filter = CardSpace.Cards.GetFilter(filterName);

            if (filter != null)
            {
                iconName = filter.TextureName;
            }
            else
            {
                iconName = namedFilter.icon;
            }

            CardSpace.Cards.CacheCardFace(namedFilter.upid, iconName, namedFilter.label, namedFilter.noLabelIcon);

            return(namedFilter);
        } // end of RegisterInCardSpace()
 public TerraCannon(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
Example #9
0
        //
        //  InkJet
        //

        public InkJet(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            //
            emitter        = new InkEmitter(InGame.inGame.ParticleSystemManager);
            emitter.Active = true;
            emitter.AddToManager();

            AddEmitter(emitter, Vector3.Zero);

            ClassColor = Base.Classification.Colors.Black;
        }   // end of InkJet c'tor
Example #10
0
 public FloatBot(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
 public RoverGreeter(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, chassis, getModelInstance, staticActor)
 {
 }
Example #12
0
 public CruiseMissile(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
 }
Example #13
0
        public void SeedPlayerData()
        {
            StaticActor actor = new StaticActor { IsPlayer = true };

            DataCollection.Players.DataType = DataType.None;
            DataCollection.Players.Add("1", actor);
        }
Example #14
0
 public SwimFish(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
     : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
 {
     preRender += SetFlex;
 }
Example #15
0
        //
        //  Light
        //

        public Light(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
        }   // end of Light c'tor
Example #16
0
        //
        //  Fan
        //

        public Fan(string classificationName, BaseChassis chassis, GetModelInstance getModelInstance, StaticActor staticActor)
            : base(classificationName, classificationName, chassis, getModelInstance, getModelInstance, staticActor)
        {
            CreateEmitter();
        }   // end of Fan c'tor