Ejemplo n.º 1
0
 public void Run(BfScript script)
 {
     scriptCmdQueue = new Queue <ScriptCmd>();
     for (int i = 0; i < script.CmdList.Count; i++)
     {
         scriptCmdQueue.Enqueue(script.CmdList[i]);
     }
 }
Ejemplo n.º 2
0
 public BrickInst(int seq, byte template, byte x, byte y, byte z, ushort code, byte rot)
 {
     Seq              = seq;
     Template         = template;
     PosX             = x;
     PosY             = y;
     PosZ             = z;
     Rot              = rot;
     Code             = code;
     BrickForceScript = null;
     pathcnt          = 0;
 }
Ejemplo n.º 3
0
    private void Start()
    {
        script = null;
        BrickProperty component = base.transform.parent.gameObject.GetComponent <BrickProperty>();

        if (null == component)
        {
            Debug.LogError("Fail to find BrickProperty");
        }
        else
        {
            BrickInst brickInst = BrickManager.Instance.GetBrickInst(component.Seq);
            if (brickInst == null)
            {
                Debug.LogError("Fail to find BrickInst ");
            }
            else
            {
                script = brickInst.BrickForceScript;
            }
            base.enabled = script.EnableOnAwake;
            Show(script.VisibleOnAwake);
        }
    }
Ejemplo n.º 4
0
 public void UpdateScript(string alias, bool enableOnAwake, bool visibleOnAwake, string commands)
 {
     BrickForceScript = new BfScript(alias, enableOnAwake, visibleOnAwake, commands);
 }