コード例 #1
0
            /// <summary>
            /// Constructor.
            /// </summary>
            /// <param name="def">Defines how this Button should be initialized.</param>
            public Button(StrandedPopupDefinition.ButtonDefinition def)
            {
                // Create the icon to show on the button.
                mObject = new GameObject(def.mIconFileName);

                // All buttons use the same background image for now.
                mBG           = new GameObject("GameObjects\\Interface\\StrandedPopup\\IconBG\\IconBG");
                mBG.pPosition = mObject.pPosition;

                mCrossOut           = new GameObject("GameObjects\\Interface\\StrandedPopup\\IconX\\IconX");
                mCrossOut.pPosition = mObject.pPosition;
                mCrossOut.pDoRender = false;

                // By default a Button has no siblings.
                mLeft = mRight = null;

                mType = def.mButtonType;

                mHintText = def.mHintText;

                mEnabled = true;

                mSetActiveAnimationMsg       = new SpriteRender.SetActiveAnimationMessage();
                mGetGunLevelsRemainingMsg    = new GunStatBoostResearch.GetGunLevelsRemainingMessage();
                mGetHealthLevelsRemainingMsg = new HealthStatBoostResearch.GetHealthLevelsRemainingMessage();
                mGetIsScoutableMsg           = new GetIsScoutableMessage();
            }
コード例 #2
0
 /// <summary>
 /// Call to put this message back into default state.
 /// </summary>
 public override void Reset()
 {
     mSelection_In = StrandedPopupDefinition.ButtonTypes.None;
 }