public override void Load()
        {
            base.Load();

            parentHead   = GetParent <head>();
            isHeadScript = parentHead != null;

            numHeadScripts = parentHead == null ? 0 : parentHead.Children.Count(n => n.GetType() == typeof(Script));

            if (isHeadScript && !compiled)
            {
                headScriptIndex++;
            }

            if (!string.IsNullOrEmpty(url))
            {
                object resource;

                if (SceneManager.Fetch(this.url, out resource))
                {
                    this.ScriptSource = (string)resource;

                    ScriptingEnabled = true;
                }
            }
            else if (!string.IsNullOrEmpty(this.ScriptSource))
            {
                ScriptingEnabled = true;
            }
        }
        public diplomat(GameData.Item item, navigation n)
        {
            this.InitializeComponent();
            this.Item = item;
            this.ou   = n.ou;
            this.nav  = n;
            this.conditionControl1.setup(item, this.nav);
            this.propertyList.setup(null, this.nav);
            this.referenceList.setup(null, this.nav);
            this.referenceList.Exclusions.Add("conditions");
            this.propertyList.grid.OnPropertyChanged += new PropertyGrid.PropertyGrid.PropertyChangedHandler(this.grid_OnPropertyChanged);
            this.nameBox.Text = this.Item.Name;
            bool state = item.getState() != GameData.State.LOCKED;

            this.nameBox.Enabled       = state;
            this.addAssault.Enabled    = state;
            this.removeAssault.Enabled = state;
            this.assaultList.Items.Clear();
            foreach (KeyValuePair <string, GameData.TripleInt> keyValuePair in this.Item.referenceData("assaults", false))
            {
                GameData.Item item1 = this.ou.gameData.getItem(keyValuePair.Key);
                this.assaultList.Items.Add(item1);
            }
            this.assaultList.Refresh();
        }
Exemple #3
0
 public animal(int no_leg_joints, int no_body_joints) : base()
 {
     hind_leg = new leg(no_leg_joints);
     torso    = new body(no_body_joints);
     skull    = new head();
     subject  = hind_leg;        // the default view is of the leg (this should be changed for the final draft)
 }
Exemple #4
0
    // Use this for initialization
    void Start()
    {
        gesture        = GetComponent <head>();
        hand           = GameObject.Find("hand");
        hand2          = GameObject.Find("hand2");
        arm            = GameObject.Find("arm");
        arm2           = GameObject.Find("arm2");
        nice           = GameObject.Find("ok");
        call           = GameObject.Find("call");
        light          = GameObject.Find("Directional Light");
        startRotation  = hand.transform.eulerAngles;
        startPosition  = arm.transform.position;
        startnPosition = nice.transform.position;

        camera    = GameObject.Find("camera");
        cameraang = camera.transform.eulerAngles;
        camerapo  = camera.transform.position;

        CloseHands();
        call.active = false;
        TimeCount   = GetComponent <Text>();

        redgem = GameObject.Find("RedGem");
        gem1   = GameObject.Find("Gem1");
        gem2   = GameObject.Find("Gem2");
        gem3   = GameObject.Find("Gem3");

        text = GameObject.Find("calling");

        makeallinvis();
        countDown = timeToSel;
        text.SetActive(false);
        showingtime = 3.0f;
        audio       = GetComponent <AudioSource>();
    }
Exemple #5
0
 public navigation()
 {
     // TODO 测试使用
     // this.SecretDeveloperMode = File.Exists("__Artist_Build_x64.exe");
     this.SecretDeveloperMode = true;
     this.ou = new head(this);
     this.InitializeComponent();
     this.treeView.SelectedNode = this.treeView.GetNodeAt(0, 0);
     this.createCategories();
 }
Exemple #6
0
        internal void BuildShapeDom(out X3D root, out Shape shape)
        {
            head  head  = new head();
            meta  meta  = new meta();
            Scene scene = new Scene();

            root  = new X3D();
            shape = new Shape();

            meta.name    = "generator";
            meta.content = BuilderApplication.AppInfo;

            scene.Children.Add(shape);
            head.Children.Add(meta);

            root.Children.Add(scene);
            root.Children.Add(head);
        }
Exemple #7
0
 /// <summary>
 /// Add
 /// </summary>
 /// <param name="node"></param>
 public override void Add(HtmlNode node)
 {
     if (node is head)
     {
         this.Children.Remove(this.head);
         this.head = node as head;
         this.Children.Add(this.head);
     }
     else if (node is body)
     {
         this.Children.Remove(this.body);
         this.body = node as body;
         this.Children.Add(this.body);
     }
     else
     {
         base.Add(node);
     }
 }
Exemple #8
0
        private string GenerHead(head h)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(@"<head>");
            if (h != null)
            {
                sb.Append(@"<documentID>" + h.documentID + "</documentID>");
                sb.Append(@"<contentFormat>" + h.contentFormat + "</contentFormat>");
                sb.Append(@"<subContentFormat>" + h.subContentFormat + "</subContentFormat>");
                sb.Append(@"<contentType>" + h.contentType + "</contentType>");
                sb.Append(@"<documentType>" + h.documentType + "</documentType>");
                sb.Append(@"<effectiveDate>" + h.effectiveDate + "</effectiveDate>");
                sb.Append(@"<expiredDate>" + h.expiredDate + "</expiredDate>");
                sb.Append(@"<entityID  id='" + h.entityID + "' />");
                sb.Append(@"<elementID id='" + h.elementID + "' />");
            }
            sb.Append(@"</head>");
            return(sb.ToString());
        }
Exemple #9
0
 public static IEnumerable <meta> meta(this head obj)
 => obj?.Items?.OfType <meta>() ?? new meta[0];
Exemple #10
0
 public static IEnumerable <config> config(this head obj)
 => obj?.Items?.OfType <config>() ?? new config[0];
Exemple #11
0
 => new Char8(head, tail);
 : tail is Seq <A> seq?Cons(head, seq)
     : SeqEnumerable <A> .New(head, tail);
 : tail is IList <A> list?Cons(head, list)
     : tail is Lst <A> lst?Seq(head.Cons(lst))
 : tail is Arr <A> arr?Cons(head, arr)
     : tail is IList <A> list?Cons(head, list)
Exemple #15
0
 var(head, tail) => head + Soma(tail)
Exemple #16
0
 => new Char32(head, tail);
 var(head, tail) = k;
Exemple #18
0
 (var head, Fist tail) => new FFist(head, tail, predicate),
tail is A[] array?Cons(head, array)
    : tail is Arr <A> arr?Cons(head, arr)
 var(head, data, position, expected) = scenarios;