예제 #1
0
            public PrimaryDefinition()
                : base(true, true)
            {
                List <IPrimaryOption <GameObject> > list = CommonOptionList <IPrimaryOption <GameObject> > .AllOptions();

                if ((list.Count == 1) && (list[0] is IVersionOption))
                {
                    mOption = list[0] as IInteractionOptionItem <IActor, GameObject, GameHitParameters <GameObject> >;
                }
            }
예제 #2
0
            public override void AddInteractions(InteractionObjectPair iop, IActor actor, TTarget target, List <InteractionObjectPair> results)
            {
                try
                {
                    string[] defPath = mPath;
                    if ((defPath == null) || (defPath.Length == 0))
                    {
                        if (mAddRoot)
                        {
                            defPath = new string[] { "NRaas", sTest.GetInteractionName(actor, target, mHit) };
                        }
                        else
                        {
                            defPath = new string[] { "NRaas" };
                        }
                    }

                    if ((mPopup) || ((VersionStamp.sPopupMenuStyle)) && (iop == null))
                    {
                        List <string> path = null;
                        if (mPopup)
                        {
                            path = new List <string>(defPath);
                        }
                        else
                        {
                            path = new List <string>();
                        }

                        if (sPopupOptions == null)
                        {
                            sPopupOptions = new List <IInteractionOptionItem <IActor, TTarget, GameHitParameters <TTarget> > >();

                            foreach (TOption option in CommonOptionList <TOption> .AllOptions())
                            {
                                sPopupOptions.Add(option.Clone() as TOption);
                            }
                        }

                        ListOptions(null, sPopupOptions, actor, target, mHit, mPopup, path, results);
                    }
                    else
                    {
                        mPath = defPath;

                        base.AddInteractions(iop, actor, target, results);
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(actor, target, e);
                }
            }
예제 #3
0
                public HotkeyOptionList(string name)
                    : base(name)
                {
                    foreach (IPrimaryOption <GameObject> paramOption in CommonOptionList <IPrimaryOption <GameObject> > .AllOptions())
                    {
                        IOptionItem option = paramOption as IOptionItem;
                        if (option == null)
                        {
                            continue;
                        }

                        mOptions.Add(new HotkeyOption(option));
                    }
                }