예제 #1
0
    private GameObject GetSegmentPreset(CustomMeshID meshID)
    {
        GameObject preset = null;

        switch (meshID)
        {
        case CustomMeshID.Default:
            Debug.Log("default");
            break;

        case CustomMeshID.Test:
            //Debug.Log("test mesh");
            preset = Instantiate(Resources.Load("Prefabs/SegmentPresets/test")) as GameObject;
            break;

        case CustomMeshID.CombatBody:
            //Debug.Log("test mesh");
            preset = Instantiate(Resources.Load("Prefabs/SegmentPresets/combatBody")) as GameObject;
            break;

        case CustomMeshID.CombatCar:
            //Debug.Log("test mesh");
            preset = Instantiate(Resources.Load("Prefabs/SegmentPresets/combatCar")) as GameObject;
            break;

        default:
            Debug.Log("error default");
            break;
        }
        return(preset);
    }
예제 #2
0
 public SegmentGenome(SegmentGenome template)
 {
     this.segmentPreset = template.segmentPreset;  // For now this will be shared reference -- Might have to change this later if meshes change!
     this.parentID      = template.parentID;
     this.scale         = template.scale;
 }