Esempio n. 1
0
        public bool execute()
        {
            var target = GameObject.Find(effect.getTargetId());

            if (target)
            {
                var representable = target.GetComponent <Representable>();
                if (representable)
                {
                    representable.Orientation = effect.GetOrientation();
                }
            }
            return(false);
        }
Esempio n. 2
0
        public void draw()
        {
            var ids = Controller.Instance.IdentifierSummary.getIds <NPC>();

            effect.setTargetId(ids[EditorGUILayout.Popup(TC.get("Element.Name28"), Array.IndexOf(ids, effect.getTargetId()), ids)]);

            EditorGUI.BeginChangeCheck();
            var orientationLabel = TC.get("ElementReference.Orientation");
            var translatedTexts  = orientationTexts.Select(TC.get).ToArray();
            var newOrientation   = (Orientation)EditorGUILayout.IntPopup(orientationLabel, (int)effect.GetOrientation(), translatedTexts, orientationValues);

            if (EditorGUI.EndChangeCheck())
            {
                effect.SetOrientation(newOrientation);
            }
        }