Example #1
0
        /// <summary>
        /// Called to enable the outline effect.
        /// </summary>
        public void enableOutline(RegisteredObject registeredBuilding, UnitBuilder builder)
        {
            // Note, this could be called multiple times if multiple builders are in the same party.
            this.gameObject.SetActive(true);

            this.buildingToPlace = registeredBuilding;
            this.cachedBuilders.Add(builder);

            this.setSize(this.buildingToPlace.getPrefab().GetComponent <BuildingBase>());

            // Gray out the action buttons while the outline is being shown.
            CameraMover.instance().actionButtons.setForceDisabled(true);
        }
        private void Awake()
        {
            this.cameraMover = this.GetComponentInParent <CameraMover>();

            this.subButtonCanvas       = this.transform.GetChild(0);
            this.currentlyShownButtons = new List <ActionButton>();

            this.buttonWrappers    = this.makeButtons(this.transform, false);
            this.subButtonWrappers = this.makeButtons(this.subButtonCanvas, true);


            this.selectedOutlineObjects = new List <SidedObjectEntity>();
        }
Example #3
0
        private void Awake()
        {
            CameraMover.singleton = this;
            this.main             = Main.instance();

            this.options = new Options();

            this.buildOutline = GameObject.Instantiate(References.list.buildOutlinePrefab).GetComponent <BuildOutline>();

            this.team = Team.getTeamFromEnum(this.objectTeam);
            this.selectedParty.setCameraMover(this);

            this.chunkLoader = new ChunkLoader(Map.instance(), this, 3);
        }
Example #4
0
 /// <summary>
 /// Disables the outline effect.
 /// </summary>
 public void disableOutline()
 {
     this.gameObject.SetActive(false);
     this.cachedBuilders.Clear();
     CameraMover.instance().actionButtons.setForceDisabled(false);
 }