コード例 #1
0
 /// <summary>
 /// Executes the step for the specified resource.
 /// </summary>
 /// <param name="resource">The resource.</param>
 public void Execute(SNAP.Scripts.IStepArgs args)
 {
     if (_if.Process(args))
         _then.Execute(args);
     else if (_else != null)
         _else.Execute(args);
 }
コード例 #2
0
    //private SNAP snap;
    // Start is called before the first frame update
    void Start()
    {
        YuusyaAI       = GameObject.Find("yuusya").GetComponent <yuusyaAI>();
        enemyAI        = GameObject.Find("boss").GetComponent <EnemyAI>();
        holding        = GetComponentInParent <SNAP>();
        TorabasamiAnim = GameObject.Find("Trap_Torabasami_Animation_1").GetComponent <Animator>();

        //FarstDame = true;
        //SecondDame = true;
        parent = transform.parent.gameObject;

        startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
        //snap = GameObject.Find("torabasami").GetComponent<SNAP>();
    }
コード例 #3
0
        public void SaveToFieldValue(SNAP.Resources.ExternalRefFieldValue value)
        {
            if (FieldText == null || FieldText.Length == 0)
                throw new SNAP.Resources.FieldException("A required field has not been filled out");

            value.Path = FieldText;
        }
コード例 #4
0
 void IResourceUI.SaveToFieldValue(SNAP.Resources.IResourceValue value)
 {
     SaveToFieldValue((ExternalRefFieldValue)value);
 }
コード例 #5
0
 public override void LoadFromFieldValue(SNAP.Resources.FieldValueList value)
 {
     FieldText = value.Values[0].ToString();
 }
コード例 #6
0
 public static bool ChooseResource(out SNAP.Resources.Resource resource)
 {
     return Implementation.ChooseResource("", out resource);
 }
コード例 #7
0
 public void LoadFromFieldValue(SNAP.Resources.FieldValueList value)
 {
     field.LoadFromFieldValue(value);
 }
コード例 #8
0
 public override void LoadFromFieldValue(SNAP.Resources.FieldValueList value)
 {
     SNAP.Resources.IScriptableValue v = value.Values[0];
     SelectedResource = ((SNAP.Resources.InternalRefValue) v).MyResource;
 }
コード例 #9
0
 public void LoadFromFieldValue(SNAP.Resources.IResourceValue value)
 {
     _resource.LoadFromFieldValue(value);
 }
コード例 #10
0
 public virtual void SaveToFieldValue(SNAP.Resources.FieldValueList value)
 {
 }
コード例 #11
0
 public virtual void LoadFromFieldValue(SNAP.Resources.FieldValueList value)
 {
 }
コード例 #12
0
 public static bool ChooseResource(
     IEnumerable <SNAP.Resources.InternalRefFieldType.Mask> masks,
     out SNAP.Resources.Resource resource)
 {
     return Implementation.ChooseResource(masks, out resource);
 }
コード例 #13
0
 public override void SaveToFieldValue(SNAP.Resources.FieldValueList field)
 {
     field.Values.Add(new SNAP.Resources.TextValue (FieldText));
 }
コード例 #14
0
 public void SaveToFieldValue(SNAP.Resources.IResourceValue value)
 {
     System.Diagnostics.Debug.Assert(value.MyType is Resources.NumericFieldType);
     ((SNAP.Resources.NumericFieldValue)value).Value = numericUpDown1.Value;
 }
コード例 #15
0
 void IResourceUI.LoadFromFieldValue(SNAP.Resources.IResourceValue value)
 {
     this.LoadFromFieldValue((NumericFieldValue)value);
 }
コード例 #16
0
        private void BuildTree(System.Windows.Forms.TreeNode parent, SNAP.Resources.Resource resource)
        {
            TreeNode treeNode = CreateTreeNode(resource);

            /// recursively build the descendants
            foreach (Resources.Resource childResource in resource.Children.Values) {
                BuildTree(treeNode, childResource);
            }

            AddNode(parent, treeNode);
        }
コード例 #17
0
 public void SaveToFieldValue(SNAP.Resources.IResourceValue value)
 {
     labelError.Visible = false;
     try
     {
         _resource.SaveToFieldValue(value);
     }
     catch (SNAP.Resources.FieldException x)
     {
         labelError.Text = x.Message;
         labelError.Visible = true;
         throw;
     }
 }
コード例 #18
0
        public override void LoadFromFieldValue(SNAP.Resources.FieldValueList value)
        {
            for (int i = 0; i < value.Values.Count; ++i)
            {
                if (i >= _elements.Count)
                    AddElement(true);

                // TODO: fix the HACK here
                SNAP.Resources.FieldValueList itemFieldValue = new SNAP.Resources.FieldValueList(value.Type);
                itemFieldValue.Values.Add(value.Values[i]);
                _elements[i].LoadFromFieldValue(itemFieldValue);
            }
        }
コード例 #19
0
        public override void SaveToFieldValue(SNAP.Resources.FieldValueList value)
        {
            if (SelectedResource == null)
                throw new System.InvalidOperationException("A required field has not been filled out");

            value.Values.Add(new SNAP.Resources.InternalRefValue (SelectedResource.QualifiedName));
        }
コード例 #20
0
 public override void SaveToFieldValue(SNAP.Resources.FieldValueList value)
 {
     foreach (MultiValueFieldElement element in _elements) {
         element.SaveToFieldValue (value);
     }
 }
コード例 #21
0
 public void SaveToFieldValue(SNAP.Resources.FieldValueList value)
 {
     field.SaveToFieldValue(value);
 }
コード例 #22
0
 void IResourceUI.LoadFromFieldValue(SNAP.Resources.IResourceValue value)
 {
     LoadFromFieldValue((TextFieldValue)value);
 }
コード例 #23
0
 public static bool ChooseResource(string type, out SNAP.Resources.Resource resource)
 {
     return Implementation.ChooseResource(type, out resource);
 }
コード例 #24
0
 void IResourceUI.SaveToFieldValue(SNAP.Resources.IResourceValue value)
 {
     SaveToValue((TextFieldValue)value);
 }
コード例 #25
0
        public override void SaveToFieldValue(SNAP.Resources.FieldValueList value)
        {
            if (FieldText == null || FieldText.Length == 0)
                throw new System.InvalidOperationException("A required field has not been filled out");

            value.Values.Add(new SNAP.Resources.ExternalRefValue (FieldText));
        }
コード例 #26
0
        public override void LoadFromFieldValue(SNAP.Resources.IResourceValue value)
        {
            throw new System.NotImplementedException();

            /// TODO: redesign and implement this
            /*
            for (int i = 0; i < value.Values.Count; ++i)
            {
                if (i >= _elements.Count)
                    AddElement(true);

                // TODO: fix the HACK here
                SNAP.Resources.FieldValueList itemFieldValue = new SNAP.Resources.FieldValueList(value.Type);
                itemFieldValue.Values.Add(value.Values[i]);
                _elements[i].LoadFromFieldValue(itemFieldValue);
            }
             */
        }
コード例 #27
0
 void IResourceUI.LoadFromFieldValue(SNAP.Resources.IResourceValue value)
 {
     LoadFromFieldValue((ExternalRefFieldValue)value);
 }
コード例 #28
0
        public override void SaveToFieldValue(SNAP.Resources.IResourceValue value)
        {
            throw new System.NotImplementedException();

            /// TODO: redesign and implement this
            /*
            foreach (MultiValueFieldElement element in _elements) {
                element.SaveToFieldValue (value);
            }
             */
        }
コード例 #29
0
 public void LoadFromFieldValue(SNAP.Resources.ExternalRefFieldValue value)
 {
     _value = value;
     FieldText = value.ToString();
 }
コード例 #30
0
ファイル: y_otori_L.cs プロジェクト: parumyon/TUT
 // Start is called before the first frame update
 void Start()
 {
     YuusyaAI    = GameObject.Find("yuusya").GetComponent <yuusyaAI>();
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     holding     = GetComponentInParent <SNAP>();
 }
コード例 #31
0
 public bool ChooseResource(string type, out SNAP.Resources.Resource resource)
 {
     FamiliesForm familiesForm = new FamiliesForm();
     if (familiesForm.ShowDialog() == DialogResult.OK)
     {
         resource = familiesForm.SelectedResource;
         return true;
     }
     resource = null;
     return false;
 }
コード例 #32
0
 // Start is called before the first frame update
 void Start()
 {
     rig2        = GameObject.Find("yuusya").GetComponent <Rigidbody2D>();
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     holding     = GetComponentInParent <SNAP>();
 }