示例#1
0
        public void Render()
        {
            _cube = GameObject.CreatePrimitive(PrimitiveType.Cube);

            CubeData = _cube.AddComponent <CubeData>();

            CubeData.SetName(Name);
            CubeData.SetInfluence(Influence);
            CubeData.SetColor(Color);

            _cube.transform.parent     = MountNode.transform;
            _cube.name                 = Name;
            _cube.transform.position   = Position;
            _cube.transform.localScale = new Vector3(0.1F, 0.1F, 0.1F) + new Vector3(Scale, Scale, Scale);
            _cube.GetComponent <Renderer>().material.color = Color;
        }