Esempio n. 1
0
        public Command_Action Btn_ChangeState()
        {
            Command_Action command_Action = new Command_Action();

            command_Action.defaultLabel = MADstateHelp.defaultLabel();
            command_Action.defaultDesc  = MADstateHelp.defaultDesc(curStateName);
            command_Action.icon         = MADstateHelp.Icon(curStateName);
            //if (stateMAD.name == "trait")
            //{
            //    command_Action.icon = ContentFinder<Texture2D>.Get("UI/Commands/MAD_trait", true);
            //}
            //else
            //{
            //    command_Action.icon = ContentFinder<Texture2D>.Get("UI/Commands/MAD_story", true);
            //}

            command_Action.action = delegate
            {
                if (curStateName == "trait")
                {
                    curStateName = "story";
                }
                else
                {
                    curStateName = "trait";
                }
                if (HasAnyContents)
                {
                    EjectContents();
                }
                oldStateName = curStateName;
            };
            command_Action.activateSound = SoundDef.Named("Click");
            return(command_Action);
        }
Esempio n. 2
0
        public override string GetInspectString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(base.GetInspectString());
            stringBuilder.AppendLine();
            stringBuilder.AppendLine(MADstateHelp.Inspect(curStateName));
            return(stringBuilder.ToString());
        }