Inheritance: MonoBehaviour
示例#1
0
 private void Awake()
 {
     _playerObject = GameObject.FindGameObjectWithTag(Tags.PLAYER).GetComponent <Transform>();
     _enemySpawner = GameObject.FindGameObjectWithTag(Tags.ENEMYSPAWNER).GetComponent <EnemySpawner>();
     _move         = GetComponent <MoveObject>();
     _move.CanMove = false;
 }
示例#2
0
    public void MoveUIDown()
    {
        StopAllCoroutines();
        Vector3 newPosition = GetNewPosition(Reference.instance.UI, -1);

        StartCoroutine(MoveObject.SmoothMove(Reference.instance.UI, newPosition, 0.2f));
    }
        /// <summary>
        /// 移动到中心点最低点
        /// </summary>
        /// <returns></returns>
        public bool MoveObjectMinCenterPoint()
        {
            Point3d maxPt   = new Point3d(this.CenterPt.X, this.CenterPt.Y, (this.CenterPt.Z - this.DisPt.Z));
            Point3d startPt = new Point3d(0, 0, 0);

            return(MoveObject.MoveObjectOfPointToPoint(startPt, maxPt, this.selectObj.ToArray()) != null);
        }
示例#4
0
 public override void Interaction(MoveObject a_obj)
 {
     if (m_cNPCBox.gameObject.activeSelf == false)
     {
         m_cNPCBox.gameObject.SetActive(true);
     }
 }
示例#5
0
        /// <summary>
        /// 活動物件每回合動作
        /// </summary>
        public override void Action()
        {
            Skills.AllDoAutoCast();
            // 回合前
            Skills.AllDoBeforeAction();
            Propertys.AllDoBeforeAction();
            // 能量調整前
            Skills.AllDoBeforeActionEnergyGet();
            Propertys.AllDoBeforeActionEnergyGet();
            // 能量調整
            ActionEnergyGet();
            // 移動規劃前
            Skills.AllDoBeforeActionPlan();
            Propertys.AllDoBeforeActionPlan();
            // 移動規劃
            MoveObject.Plan();
            // 移動動作前
            Skills.AllDoBeforeActionMove();
            Propertys.AllDoBeforeActionMove();
            // 移動動作
            MoveObject.Move();
            // 回合後
            Skills.AllDoAfterAction();
            Propertys.AllDoAfterAction();
            // 結算
            Settlement();
            Skills.AllSettlement();
            Propertys.AllSettlement();

            OnAfterAction();
            Propertys.ClearAllDisabled();
        }
示例#6
0
    void Start()
    {
        sprCayTrong = transform.GetChild(1).GetComponent <SpriteRenderer>();

        moveObject = GetComponent <MoveObject>();
        if (PlayerPrefs.HasKey("checkSeed" + gameObject.name))
        {
            idSeed   = PlayerPrefs.GetInt("checkSeed" + gameObject.name);
            time     = GameManager.Instance.dataStorage.dataStorages[idSeed].time;
            timeLive = TimeManager.Instance.timeOutApp(gameObject.name);
            transform.GetChild(1).gameObject.SetActive(true);

            if (timeLive < time)
            {
                timeLive = time - timeLive;
                if (timeLive <= time / 2)
                {
                    sprCayTrong.sprite = GameManager.Instance.dataSprite.sprSeed[1].spr[idSeed];
                }
                else
                {
                    sprCayTrong.sprite = GameManager.Instance.dataSprite.sprSeed[0].spr[idSeed];
                }
                StartCoroutine(timeSeedGrow());
            }
            else
            {
                timeLive = 0;
                transform.GetChild(3).gameObject.SetActive(true);
                sprCayTrong.sprite = GameManager.Instance.dataSprite.sprSeed[2].spr[idSeed];
            }
        }
    }
示例#7
0
    // Use this for initialization
    void Awake()
    {
        destSetter      = GetComponent <Pathfinding.AIDestinationSetter>();
        destLerp        = GetComponent <Pathfinding.AILerp>();
        player          = GameObject.Find("Player");
        curseController = GameObject.Find("CurseController").GetComponent <CurseController>();

        enemyTransform   = GetComponent <Transform>();
        enemyBoxCollider = GetComponent <BoxCollider2D>();
        stats            = GetComponent <ObjectStats>();
        moveScript       = GetComponent <MoveObject>();
        moveConf         = GetComponent <MoveConfirmation>();

        gameCamera = GameObject.Find("Main Camera").GetComponent <CameraController>();

        enemyHealthBar     = this.transform.Find("ObjectCanvas").transform.Find("EnemyHealthBar").gameObject.GetComponent <RectTransform>();
        enemyCanvas        = this.transform.Find("ObjectCanvas").gameObject;
        healthBarMaxWidth  = enemyHealthBar.rect.width;
        healthBarCurrWidth = healthBarMaxWidth;

        spriteRender = GetComponent <SpriteRenderer>();

        stunned = false;


        InitializeValues();

        destSetter.target = player.transform;

        wallLayer = 8;
    }
示例#8
0
    public override MoveObject Move(GameObject go)
    {
        if (go != gameObject)
        {
            return(base.Move(go));
        }

        Vector3 foward = transform.position - Utility.DataToPosition(gameTask.playerTask.pos);

        Vector3[]  movePoss   = new Vector3[] { go.transform.position, go.transform.position + foward };
        MoveObject moveObject = new MoveObject(go, movePoss, 3f);

        Gimmick[]    fire     = gameTask.GetGimmcks(new Utility.ObjectId[] { Utility.ObjectId.Fire });
        Vector3Int[] firePoss = new Vector3Int[fire.Length];
        for (int i = 0; i < firePoss.Length; i++)
        {
            firePoss[i] = Utility.PositionToData(fire[i].transform.position);
        }

        if (MeltMoveIf(firePoss, Utility.PositionToData(go.transform.position + foward)))
        {
            moveObject.endEvent = MeltMove(go.transform.position + foward);
        }

        return(moveObject);
    }
 private void Start()
 {
     Controller     = GameObject.Find("FPSController").GetComponent <FirstPersonController>();
     Controller.tag = "Player";
     //Cube = GameObject.Find("CUBE");
     MoveObject = GameObject.Find("CUBE").GetComponent <MoveObject>();
 }
示例#10
0
    public void MoveCameraUp()
    {
        StopAllCoroutines();
        Vector3 newPosition = GetNewPosition(Reference.instance.MainCamera, 1);

        StartCoroutine(MoveObject.SmoothMove(Reference.instance.MainCamera, newPosition, 0.2f));
    }
示例#11
0
 protected override void Awake()
 {
     // Get move components of doors
     leftDoorMoveObject  = leftDoor.GetComponent <MoveObject>();
     rightDoorMoveObject = rightDoor.GetComponent <MoveObject>();
     base.Awake();
 }
示例#12
0
        /// <summary>
        /// Awake this instance.
        /// </summary>
        private void Awake( )
        {
            // デフォルトスピード.
            SpeedRight    = PlayerConfig.DefaultSpeedRight;
            AddSpeedRight = 0.0f;

            // Setting up references.
            objGameManager   = GameObject.Find("/_GameManager");
            gameManager      = objGameManager.GetComponent <GameManager>();
            dustStorm        = transform.FindChild("Dust Storm").gameObject;
            barrier          = transform.FindChild("Barrier").gameObject;
            transformBarrier = barrier.transform;

            defaultPlayerLocalScale = transform.localScale;

            BoneAnimation = transform.FindChild("BoneAnimation").gameObject;
            anim          = BoneAnimation.GetComponent <Animation>();

            objHeadLeaf = transform.FindChild("BoneAnimation/Root/Total/Body/Head/Leaf").gameObject;

            boxCollider2D = this.GetComponent <BoxCollider2D>();

            // animation 初期値.
            animStatus = PlayerConfig.AnimationStatusList.Run;

            moveObjectHandler = this.GetComponent <MoveObject>();

            groundCheckDistance = PlayerConfig.DefaultGroundCheck;

            rigidBody2D = this.GetComponent <Rigidbody2D>();
        }
示例#13
0
文件: Tree.cs 项目: dqchess/Farm-Golb
    void Start()
    {
        moveObject = GetComponent <MoveObject>();
        animator   = transform.GetChild(1).GetComponent <Animator>();
        timeLive   = time;
        if (PlayerPrefs.HasKey("timeSave" + gameObject.name))
        {
            timeLive = TimeManager.Instance.timeOutApp(gameObject.name);
            if (timeLive < time)
            {
                timeLive = time - timeLive;

                if (timeLive <= time / 2)
                {
                    BeeFlyTree();
                    transform.GetChild(1).GetComponent <SpriteRenderer>().sprite = GameManager.Instance.dataSprite.sprTree[1].spr[idTree];
                }
                StartCoroutine(timeTree());
            }
            else
            {
                timeLive = 0;
                transform.GetChild(1).GetComponent <SpriteRenderer>().sprite = GameManager.Instance.dataSprite.sprTree[2].spr[idTree];
                transform.GetChild(2).gameObject.SetActive(true);
            }
        }
    }
示例#14
0
文件: Hive.cs 项目: dqchess/Farm-Golb
    private void Start()
    {
        this.RegisterListener(EventID.OnBeeFlyTree, (param) => takeHoney((Vector3)param));
        gameObject.transform.SetParent(GameManager.Instance.ObCage);
        moveObject  = GetComponent <MoveObject>();
        numberHoney = PlayerPrefs.GetInt("hive" + gameObject.name);
        if (PlayerPrefs.HasKey("timeSave" + gameObject.name))
        {
            timeLive = TimeManager.Instance.timeOutApp(gameObject.name);

            if (timeLive < time)
            {
                timeLive = time - timeLive;
            }
            else
            {
                timeLive = 0;
            }
            StartCoroutine(timeHive());
        }

        if (numberHoney > 0)
        {
            for (int i = 0; i < numberHoney; i++)
            {
                transform.GetChild(i + 2).gameObject.SetActive(true);
            }
            transform.GetChild(5).gameObject.SetActive(true);
        }
    }
示例#15
0
    // Start is called before the first frame update
    void Start()
    {
        moveObject = FindObjectOfType <MoveObject>();
        moveObject.MouseClickEvent += DeductClickCount;

        movesLeftText.text = "Moves Left: " + mouseclick.ToString();
    }
示例#16
0
    protected override void Update()
    {
        base.Update();

        //if (!_enemyObject)
        {
            GameObject obj = Helper.FindClosestObject(transform.position, new [] { TagKind.Monster.ToString(), TagKind.Cow.ToString() });
            if (obj)
            {
                //Debug.Log("Find closest:" + obj.name);
                _enemyObject = obj.GetComponent <MoveObject>();
            }
        }

        if (_enemyObject)
        {
            if (Distance(_enemyObject) > Attack.AttackRange)
            {
                MoveToPosition(_enemyObject.Position);
            }
            else
            {
                _bulletManager.Shot(this, _enemyObject, TagKind.Enemy, Attack);
                Stop();
            }
        }
    }
示例#17
0
 // Use this for initialization
 void Start()
 {
     moveObject         = GetComponent <MoveObject> ();
     mainSpriteRenderer = GetComponent <SpriteRenderer> ();
     earSpriteRenderer  = GameObject.Find("Ear").GetComponent <SpriteRenderer>();
     //transform.rotation = Quaternion.Euler(0, 0, -20);
 }
示例#18
0
    void FixedPointCSTest_Matrix2()
    {
        //MoveObject obj = new MoveObject();
        //F64Vec2 pos = F64Vec2.Zero;
        //F64Vec2 heading = F64Vec2.Right; //1,0
        //F64Vec2 side = F64Vec2.Up; //0,1

        F64Matrix3x3 m = new F64Matrix3x3();
        //F64Vec2 point = F64Vec2.FromFloat(2, 3);
        //F64Vec2 point2 = m.PointToLocalSpace(point,
        //                        heading,
        //                        side,
        //                        pos);
        //Debug.LogError(point2.X.Float + " " + point2.Y.Float);

        MoveObject obj = new MoveObject();

        obj.SetPos(F64Vec3.Zero);
        obj.SetDir(new F64Vec3(1, 0, 0));
        //var f = F64Vec3.RotateY(obj.forward, new FixMath.F64(-90));
        //Debug.LogError(obj.forward + " " + F64Vec3.Normalize(f).ToUnityVector3());

        F64Vec3 check = new F64Vec3(2, 0, 3);
        var     r3    = F64Vec3.PointToLocalSpace2D(check, obj.forward, obj.left, obj.GetPos());

        //Debug.LogError(check2.X.Float + " " + check2.Y.Float);
        Debug.LogError(r3);
    }
示例#19
0
    public void TakeDamage(InstancePokemonObject enemy, MoveObject move)
    {
        int damage = DamageCalculator.CalculateDamage(enemy.Level, move.Power, enemy.Attack, Pokemon.Defense);

        Pokemon.CurrentHp -= damage;
        StartCoroutine(PauseAndTakeDamage());
    }
示例#20
0
    void fff(MoveObject obj, F64Vec3 pos, F64 radius)
    {
        F64 sqrDis  = F64Vec3.LengthSqr(obj.GetPos() - pos);
        F64 sqrDis2 = obj.moveData.detectionLen + radius;

        sqrDis2 *= sqrDis2;
        if (sqrDis <= (sqrDis2))
        {
            //在后面
            var local = F64Vec3.PointToLocalSpace2D(pos, obj.forward, obj.left, obj.GetPos());
            Debug.LogError("范围内 WORLD " + pos.ToUnityVector3() + "LOCAL " + local.ToUnityVector3());
            Debug.LogError(local);
            if (local.X >= F64.Zero)
            {
                Debug.LogError("在前面 WORLD " + pos + "LOCAL " + local);
                F64 absZ = F64.Abs(local.Z);
                Debug.LogError("碰到q abs=" + absZ + " " + (radius + obj.moveData.detectionWidth) +
                               " radius=" + radius + " w=" + obj.moveData.detectionWidth);
                if (absZ <= (radius + obj.moveData.detectionWidth))
                {
                    Debug.LogError("碰到 abs=" + absZ + " " + (radius + obj.moveData.detectionWidth) +
                                   " radius=" + radius + " w=" + obj.moveData.detectionWidth);
                }
            }
        }
    }
示例#21
0
        public void AlterMove(ElectrodeModel model)
        {
            List <Body> bodys = new List <Body>();

            NXOpen.Features.Feature moveFeature    = null;
            NXOpen.Features.Feature patternFeature = null;
            NXOpen.Features.Feature linkedFeature  = null;
            foreach (NXOpen.Features.Feature ft in model.PartTag.Features.ToArray())
            {
                if (ft.FeatureType.Equals("MOVE_OBJECT", StringComparison.CurrentCultureIgnoreCase))
                {
                    moveFeature = ft;
                }
                if (ft.FeatureType.Equals("Pattern Geometry", StringComparison.CurrentCultureIgnoreCase))
                {
                    patternFeature = ft;
                }
                if (ft.FeatureType.Equals("LINKED_BODY", StringComparison.CurrentCultureIgnoreCase))
                {
                    linkedFeature = ft;
                }
            }
            bodys.AddRange(((NXOpen.Features.BodyFeature)linkedFeature).GetBodies());
            bodys.AddRange(((NXOpen.Features.PatternGeometry)patternFeature).GetAssociatedBodies());

            MoveObject.CreateMoveObjToXYZ("moveX", "moveY", "moveZ", moveFeature as NXOpen.Features.MoveObject, bodys.ToArray());
        }
 public MoveBackward(MoveObject moveObject)
 {
     this.moveObject = moveObject;
     positionHistory = new Stack <Vector3>();
     //rotationHistory = new Stack<Quaternion>();
     velocityHistory = new Stack <Vector3>();
 }
示例#23
0
        protected override IEnumerator OnBehaviorEnable()
        {
            /* Don't Do Anything If Move Missed */
            if (move.Missed && spawnAt == SpawnEntity.target)
            {
                yield break;
            }

            /* Spawn Moveobject With This Move As The Parent */
            instance = SpawnInstance(moveObject);

            /* Orient Beam Emitter */
            move.User.Anim.beamEmission.EnableLockOn(move.User.CurrentTarget.Collider.bounds.center);

            if (launch)
            {
                yield return(new WaitForSeconds(launchDelay));

                StartCoroutine(instance.transform.MoveOvertime(
                                   move.User.CurrentTarget.Collider.bounds.center,
                                   launchSpeed,
                                   MoveOvertimeType.Linear));
            }

            /* Wait For Gameobject Lifetime */
            yield return(new WaitForSeconds(objectLife));

            StopAllCoroutines();

            /* Disable Lock On For Beam Emitter */
            move.User.Anim.beamEmission.DisableLockOn();

            /* Destroy The Gameobject */
            Destroy(instance.gameObject);
        }
示例#24
0
    public Vector3 currentGoal; // Debugging

    private void Awake()
    {
        material = figures[0].material;
        ChangeFigure(0);

        animator   = GetComponentInChildren <Animator>();
        moveObject = GetComponent <MoveObject>();
    }
示例#25
0
    public void CreateCharacter(int Cid, string Cname, float ax, float ay)
    {
        MoveObject temp = Instantiate(MoveObjectList.instance.playerObject, new Vector3(0, 0, 0), Quaternion.identity);

        temp.id                 = Cid;
        temp.nickName           = Cname;
        temp.transform.position = new Vector3(ax, ay, temp.transform.position.z);
    }
 void Awake()
 {
     if (use)
     {
         return;
     }
     use = this;
 }
示例#27
0
 private void OnCollisionExit2D(Collision2D col)
 {
     if (col.collider.tag == moveFloorTag)
     {
         //動く床から離れた
         moveObj = null;
     }
 }
示例#28
0
    // Контакт со стеной.
    private void ContactWall(GameObject collision)
    {
        Wall wall = collision.gameObject.GetComponent <Wall>();

        // Если стена - портал.
        if (wall.IsPortal)
        {
            if (sideNow == wall.sideIn)
            {
                ContactWallPortal(wall);

                return;
            }
        }
        // Если стена двигается.
        if (wall.IMove)
        {
            if (wall.MyColor != MyColor)
            {
                MoveObject moveObj = collision.gameObject.GetComponent <MoveObject>();
                moveObj.canMove = false;
                objectTouch     = moveObj;

                DeEnableMyColliders();
            }
        }
        // Если стена - граница, то рестарт уровня.
        if (wall.MyColor == AllColor.white)
        {
            DeEnableMyColliders();

            soundCon.PlaySound("restart");
            StartCoroutine(RestartLevel());
        }
        // Если цвет Player не равен цвету стены, то он останавливается рядом с ней.
        if (MyColor != wall.MyColor)
        {
            if (!canMoveleft)
            {
                newPos.x = wall.transform.position.x + 2;
            }
            else if (!canMoveRight)
            {
                newPos.x = wall.transform.position.x - 2;
            }
            else if (!canMoveup)
            {
                newPos.y = wall.transform.position.y - 2;
            }
            else if (!canMovedown)
            {
                newPos.y = wall.transform.position.y + 2;
            }

            // Отключаются колайдеры Player.
            DeEnableMyColliders();
        }
    }
/// <summary>
/// Awake this instance.
/// </summary>
    private void Awake( )
    {
        gameManager         = GameObject.Find("_GameManager").GetComponent <GameManager>();
        tellerLeft          = transform.FindChild("TellerLeft").gameObject;
        tellerRight         = transform.FindChild("TellerRight").gameObject;
        balloonMoveObject   = transform.FindChild("Talk/Balloon").GetComponent <MoveObject>();
        uiLabelMessageLeft  = balloonMoveObject.transform.FindChild("MessageLeft").gameObject.GetComponent <UILabel>();
        uiLabelMessageRight = balloonMoveObject.transform.FindChild("MessageRight").gameObject.GetComponent <UILabel>();
    }
	// -----------------     ----------------     ----------------     ----------------    ----------------     ----------------      // 
	// Manages All Necessiary Attributes And Qualities On Awake
	void Awake () 
	{
	
	// ----------  ----------    ----------   ---------- //
	// Checks Whether A Suitable Animation Has Been Selected
	animation = this.gameObject.GetComponent <AntAnimation> ();
	movement  = this.gameObject.GetComponent <MoveObject> ();
	
	}
 // Start is called before the first frame update
 void Awake()
 {
     centerTile      = transform.position;
     currentPosition = transform.position;
     leftTile        = Vector3.left;
     rightTile       = Vector3.right;
     rb = GetComponent <Rigidbody2D>();
     moveObjectScript = GetComponent <MoveObject>();
 }
 /// <summary>
 /// Awake this instance.
 /// </summary>
 private void Awake( )
 {
     gameManager	= GameObject.Find ( "_GameManager" ).GetComponent<GameManager>();
     tellerLeft	= transform.FindChild( "TellerLeft" ).gameObject;
     tellerRight	= transform.FindChild( "TellerRight" ).gameObject;
     balloonMoveObject	= transform.FindChild( "Talk/Balloon" ).GetComponent<MoveObject>();
     uiLabelMessageLeft		= balloonMoveObject.transform.FindChild( "MessageLeft" ).gameObject.GetComponent<UILabel>();
     uiLabelMessageRight		= balloonMoveObject.transform.FindChild( "MessageRight" ).gameObject.GetComponent<UILabel>();
 }
    public void SetupDecorObject(MoveObject obj, float carX)
    {
        int side = Mathf.Round (Random.value) == 0 ? 1 : - 1;

        obj.offset = new Vector3( (Random.value * 7f * side) + (7f * side *2), 0f, 0f);

        // Beacons
        obj.ConfigBeacons(
            frontPos,
            topPos,
            backPos,
            carX
            );
    }
示例#34
0
	public void addWaypointsToObjet(MoveObject moveObject) {
		foreach(Transform t in m_Waypoints) {
			moveObject.addWaypoint(t.position);
		}
	}
示例#35
0
 void Start()
 {
     obj = MoveObject.Instance;
 }
示例#36
0
 void Awake()
 {
     mInstance = this;
 }
示例#37
0
        /// <summary>
        /// Awake this instance.
        /// </summary>
        private void Awake( )
        {
            // デフォルトスピード.
            SpeedRight	= PlayerConfig.DefaultSpeedRight;
            AddSpeedRight	= 0.0f;

            // Setting up references.
            objGameManager	= GameObject.Find ( "/_GameManager" );
            gameManager		= objGameManager.GetComponent<GameManager>();
            dustStorm	= transform.FindChild( "Dust Storm" ).gameObject;
            barrier		= transform.FindChild( "Barrier" ).gameObject;
            transformBarrier	= barrier.transform;

            defaultPlayerLocalScale	= transform.localScale;

            BoneAnimation	= transform.FindChild( "BoneAnimation" ).gameObject;
            anim			= BoneAnimation.GetComponent<Animation>();

            objHeadLeaf		= transform.FindChild( "BoneAnimation/Root/Total/Body/Head/Leaf" ).gameObject;

            boxCollider2D	= this.GetComponent<BoxCollider2D>();

            // animation 初期値.
            animStatus	= PlayerConfig.AnimationStatusList.Run;

            moveObjectHandler	= this.GetComponent<MoveObject>();

            groundCheckDistance	= PlayerConfig.DefaultGroundCheck;

            rigidBody2D	= this.GetComponent<Rigidbody2D>();
        }
示例#38
0
 void Start()
 {
     my_move_object = GetComponent<MoveObject>();
     move_pivot = false;
 }
 public void UpdateObject(MoveObject obj, float deltaTime, float speed)
 {
     obj.UpdateTime(deltaTime, speed);
 }
示例#40
0
	public void addWaypoint(MoveObject moveObject) {
		moveObject.addWaypoint(transform.position);
	}
示例#41
0
    // Parse the XML file
    void Start()
    {
        // Initialisation of interface list
        ml_Object_map = new List<GameObject>();
        ml_list_gui = new List<InterfaceElement>();

        s_text_area = "Enter a title";
        save_load.SetActive(false);
        mc_save = null;
        mr_rect = new Rect(Screen.width/1.20F, Screen.height/4F, Screen.width/9F, Screen.height/3F);

        m_obj = MoveObject.Instance;
        m_map = Map.Instance;

        // Options for XmlReader, ignore whitespace, comments and continue to read
        XmlReaderSettings settings = new XmlReaderSettings();
        settings.IgnoreWhitespace = true;
        settings.IgnoreComments = true;

        using (XmlReader xml_reader = XmlReader.Create(new StringReader(mta_xmlfile.text),settings))
        {
            xml_reader.ReadStartElement("menu");

            // while node is an element and its name is "group"
            while (xml_reader.NodeType == XmlNodeType.Element && xml_reader.Name == "group")
            {
                // Extract attributs
                InterfaceElement s_InterfaceElement;
                s_InterfaceElement = check_attribute_group(xml_reader);
                s_InterfaceElement.l_element = new List<Element>();

                // read in the node
                xml_reader.ReadStartElement("group");

                // while node is an element and its name is "element"
                while (xml_reader.NodeType == XmlNodeType.Element && xml_reader.Name == "element")
                {
                    Element element = new Element(mg_defaut);
                    element = check_attribute_element(xml_reader, element);
                    xml_reader.ReadStartElement("element");
                    element.content = xml_reader.ReadString();
                    s_InterfaceElement.l_element.Add(element);

                    // element
                    xml_reader.ReadEndElement();
                }

                // group
                xml_reader.ReadEndElement();
                ml_list_gui.Add(s_InterfaceElement);
            }

            // menu
            xml_reader.ReadEndElement();
        }
    }
    void Start()
    {
        mr_rect = new Rect(Screen.width/1.22F, Screen.height/10F, Screen.width/7F, Screen.height/7F);

        position_x = "";
        position_y = "";
        position_z = "";

        rotation_x = "";
        rotation_y = "";
        rotation_z = "";

        m_move_object = MoveObject.Instance;
    }
    public void SetupMoveObject(MoveObject obj, float carX)
    {
        float offset = (Random.value * (float)roadSize) - ((float)roadSize*0.5f);

        obj.offset = new Vector3( offset, 0.25f, 0f);
        //		Debug.Log ("Offset : " + obj.offset);

        // Beacons
        obj.ConfigBeacons(
            frontPos,
            topPos,
            backPos,
            carX
        );
    }