コード例 #1
0
ファイル: DynShelterModel.cs プロジェクト: gviaud/OS-unity-5
    //GetStyles --------------------------
    public string[] GetStylesNameOfSize(int taille,FunctionConf_Dynshelter.ModuleType typ)
    {
        switch(typ)
        {
        case FunctionConf_Dynshelter.ModuleType.bloc:
            if(_blocs.ContainsKey(taille))
                return _blocs[taille];
            else
                return null;
            break;

        case FunctionConf_Dynshelter.ModuleType.facade:
            if(_facades.ContainsKey(taille))
                return _facades[taille];
            else
                return null;
            break;

        case FunctionConf_Dynshelter.ModuleType.extremite:
            if(_extrems.ContainsKey(taille))
                return _extrems[taille];
            else
                return null;
            break;

        default:
            return null;
            break;
        }
    }
コード例 #2
0
ファイル: DynShelterModel.cs プロジェクト: gviaud/OS-unity-5
 public string GetFirstStyle(FunctionConf_Dynshelter.ModuleType typ,int taille)
 {
     string output = "";
     switch (typ)
     {
     case FunctionConf_Dynshelter.ModuleType.bloc:
         output = _blocs[taille][0];
         break;
     case FunctionConf_Dynshelter.ModuleType.facade:
         output = _facades[taille][0];
         break;
     case FunctionConf_Dynshelter.ModuleType.extremite:
         output = _extrems[taille][0];
         break;
     }
     return output;
 }
コード例 #3
0
ファイル: DynShelterUI.cs プロジェクト: gviaud/OS-unity-5
    public DynShelterUI(FunctionConf_Dynshelter configurator)
    {
        _configurator = configurator;
        _modManager = configurator.GetModManager();

        _UISelector = configurator.GetUISelector();

        _uiSelectorPos = new Rect(0,Screen.height/2 - viewHeight/2,200,viewHeight);
        _uiSlideDetect = new Rect(0,Screen.height/2 - (viewHeight+100)/2,200,viewHeight+100);
        _uiSvExt = new Rect(0,0,_uiSelectorPos.width,viewHeight);
        targetPos = margin-(viewHeight/4);

        _rightArea = new Rect(Screen.width-260,100,260,Screen.height-100);
        _leftArea = new Rect(0.0f, 0.0f, Screen.width * 2.0f, Screen.height);//new Rect(0,_uiSlideDetect.y-200,260,_uiSelectorPos.height+200+150);
        _upperArea = new Rect(Screen.width/2 - 400,50,800,150);

        items = new string[0];
    }
コード例 #4
0
ファイル: DynShelterModule.cs プロジェクト: gviaud/OS-unity-5
    //CONSTRUCTOR---
    public DynShelterModule(int size,string style,FunctionConf_Dynshelter.ModuleType type,Color32 color,FunctionConf_Dynshelter parent)
    {
        _size = size;
        _style = style;
        _type = type;
        _color = color;
        _parentConf = parent;

        //--------------------------------------------

        _tag = _type.ToString()+"_t"+_size+"_"+_style;
        _canMoveNext = true;
        _canMovePrev = true;
        _lockNext = true;
        _lockPrev = true;
        _isAnchored = false;
        _nextModule = null;
        _prevModule = null;

        _transparent = new Material(Shader.Find("Transparent/Diffuse"));
        _transparent.color = new Color(1,1,1,0.25f);
        _backUpMaterials = new ArrayList();
    }
コード例 #5
0
ファイル: DynShelterExtrem.cs プロジェクト: gviaud/OS-unity-5
 public DynShelterExtrem(int size,string style,FunctionConf_Dynshelter.ModuleType type,Color32 color,FunctionConf_Dynshelter parent)
     : base(size,style,type,color,parent)
 {
 }
コード例 #6
0
ファイル: DynShelterModel.cs プロジェクト: gviaud/OS-unity-5
 //Constructor -----------------------
 public DynShelterModel(FunctionConf_Dynshelter parent)
 {
     _parent = parent;
 }
コード例 #7
0
 //---------------------------------
 void Awake()
 {
     _parent = GetComponent<FunctionConf_Dynshelter>();
     _parent.SetModManager(this);
 }
コード例 #8
0
ファイル: DynShelterBloc.cs プロジェクト: gviaud/OS-unity-5
 //-------------------------vv--FCNS--vv------------------------------------------------------
 public DynShelterBloc(int size,string style,FunctionConf_Dynshelter.ModuleType type,Color32 color,FunctionConf_Dynshelter parent)
     : base(size,style,type,color,parent)
 {
     _isFirstEnd = _isLastEnd = false;
 }