示例#1
0
    public void AddProcessUnit(ObjectCreatManager.RobotCreateControllor rcc )
    {
        GameObject unitObj = Instantiate(Resources.Load("UI/Prefab/CreateProcessUnit") as GameObject) as GameObject;
        CreateProcessUnit unitCom = unitObj.GetComponent<CreateProcessUnit>();
        unitObj.transform.parent = this.transform;

        units.Add(unitCom);

        unitCom.Init(rcc,units.Count );
    }
示例#2
0
    public void Init(ObjectCreatManager.RobotCreateControllor _rcc , int order )
    {
        rcc = _rcc;
        Debug.Log("CreateProcessUnit Init " + Global.UI_ROBOT_PATH + rcc.GetInfo().bodyName.ToString());
        body.sprite = Resources.Load<Sprite>(Global.UI_ROBOT_PATH + rcc.GetInfo().bodyName.ToString());
        for(int i = 0 ; i < 3 ; ++ i )
        {
            equipments[i].sprite = Resources.Load<Sprite>(Global.UI_ROBOT_PATH + rcc.GetInfo().equipments[i].ToString());
        }
        equipments[3].sprite = equipments[1].sprite;

        Vector2 pos = back.rectTransform.anchoredPosition;
        pos.x = 60f + order * 100f;

        back.rectTransform.anchoredPosition = pos;
    }
示例#3
0
 public ObjectCreatManager()
 {
     s_Instance = this;
 }