コード例 #1
0
ファイル: SupremeCommander.cs プロジェクト: hengun348/Exjobb
    void Start()
    {
        //create UnitCommander
        unitCommander = (UnitCommander)Instantiate(Resources.Load(("Prefabs/UnitCommander"), typeof(UnitCommander)));
        unitCommander.transform.position = transform.parent.position;
        unitCommander.transform.parent   = transform.parent;
        unitCommander.SetClan(clan);

        //create BuildingCommander
        buildingCommander = (BuildingCommander)Instantiate(Resources.Load(("Prefabs/BuildingCommander"), typeof(BuildingCommander)));
        buildingCommander.transform.position = transform.parent.position;
        buildingCommander.transform.parent   = transform.parent;
        buildingCommander.SetClan(clan);
    }
コード例 #2
0
    void Start()
    {
        //create UnitCommander
        unitCommander = (UnitCommander)Instantiate(Resources.Load(("Prefabs/UnitCommander"), typeof(UnitCommander)));
        unitCommander.transform.position = transform.parent.position;
        unitCommander.transform.parent = transform.parent;
        unitCommander.SetClan(clan);

        //create BuildingCommander
        buildingCommander = (BuildingCommander)Instantiate(Resources.Load(("Prefabs/BuildingCommander"), typeof(BuildingCommander)));
        buildingCommander.transform.position = transform.parent.position;
        buildingCommander.transform.parent = transform.parent;
        buildingCommander.SetClan(clan);
    }