예제 #1
0
		} // constructure  

		public floorTileType (
			ushort _displayChar = 0,
			color _foreColor = null,
			int _backColor = 0,
			short _drawPriority = 0,
			int _chanceToIgnite = 0,
			dungeonFeatureTypes _fireType = (dungeonFeatureTypes)0,
			dungeonFeatureTypes _discoverType = (dungeonFeatureTypes)0,
			dungeonFeatureTypes _promoteType = (dungeonFeatureTypes)0,
			short _promoteChance = 0,
			lightType _glowLight = lightType.NO_LIGHT,
			ulong _flags = 0,
			ulong _mechFlags = 0,
			string _description = "", //  = new char [COLS];
			string _flavorText = "" 
		) : this (  
			_displayChar ,
			_foreColor  ,
			null  ,
			_drawPriority  ,
			_chanceToIgnite ,
			_fireType ,
			_discoverType ,
			_promoteType ,
			_promoteChance  ,
			_glowLight ,
			_flags ,
			_mechFlags ,
			_description , //  = new char [COLS];
			_flavorText 
		
		) 
		{   } // constructure  
예제 #2
0
    public override void OnInspectorGUI()
    {
        lightManager myTarget = (lightManager)target;

        DrawDefaultInspector();

        EditorUtility.SetDirty(myTarget);

        foreach (var item in Resources.LoadAll("LightType", typeof(lightType)))
        {
            lightType aux = (lightType)item;
            if (!myTarget.listLights.Contains(aux))
            {
                myTarget.listLights.Add(aux);
            }
        }

        _ligthName = EditorGUILayout.TextField("Nome: ", _ligthName);

        EditorGUILayout.BeginHorizontal();

        _begin = EditorGUILayout.IntField("Begin: ", _begin, GUILayout.Width(175));

        _end = EditorGUILayout.IntField("End: ", _end, GUILayout.Width(175));

        EditorGUILayout.EndHorizontal();

        _ligthColor = EditorGUILayout.ColorField("Cor da Luz: ", _ligthColor);

        EditorGUILayout.BeginHorizontal();

        _intensity = EditorGUILayout.Slider(_intensity, 0, 5.00f);

        _turnOnLights = EditorGUILayout.Toggle("On Ligths: ", _turnOnLights);

        EditorGUILayout.EndHorizontal();

        if (GUILayout.Button("Testar Luz"))
        {
            myTarget.testLigth(_ligthColor, _intensity);
        }

        EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);

        if (GUILayout.Button("Salvar Luzes"))
        {
            var ligthType = ScriptableObject.CreateInstance <lightType>();
            ProjectWindowUtil.CreateAsset(ligthType, "Assets/Resources/LightType/" + _ligthName + ".asset");

            ligthType.init(_ligthName, _ligthColor, _intensity, _begin, _end, _turnOnLights);
        }
    }
예제 #3
0
        public creatureType(
            monsterTypes nMonsterID        = monsterTypes.MK_YOU,
            string _monsterName            = "", char _displayChar = ' ',
            color _foreColor               = null, // will warn if null
            short _maxHP                   = 0, short _defense = 0, short _accuracy = 0,
            randomRange _damage            = null, // do nothing if null
            long _turnsBetweenRegen        = 0,
            short _movementSpeed           = 0,
            short _attackSpeed             = 0,
            dungeonFeatureTypes _bloodType = (dungeonFeatureTypes)0,
            lightType _intrinsicLightType  = lightType.NO_LIGHT,
            short _DFChance                = 0,
            dungeonFeatureTypes _DFType    = (dungeonFeatureTypes)0,
            boltType [] _bolts             = null,    // it's ok, maybe
            ulong _flags                   = 0,
            ulong _abilityFlags            = 0

            )
        {
            monsterID   = (monsterTypes)nMonsterID;
            monsterName = _monsterName;
            displayChar = _displayChar;
            foreColor   = _foreColor;
            if (foreColor == null)
            {
                foreColor = Global.black;
                Debug.LogError("monster color not initialized : " + nMonsterID);
            }
            maxHP             = _maxHP;
            defense           = _defense;
            accuracy          = _accuracy;
            damage            = _damage;
            turnsBetweenRegen = _turnsBetweenRegen;
            movementSpeed     = _movementSpeed;
            attackSpeed       = _attackSpeed;

            bloodType          = _bloodType;
            intrinsicLightType = _intrinsicLightType;
            DFChance           = _DFChance;
            DFType             = _DFType;

            bolts = _bolts;
            if (bolts == null)
            {
                bolts = new boltType [20];
            }

            flags        = _flags;
            abilityFlags = _abilityFlags;
        } // constructure
예제 #4
0
 /// <summary>
 /// Will convirt a given lightType to the apropriate BeamType
 /// </summary>
 /// <param name="convertTarget">The given lightType</param>
 /// <returns> the converted BeamType</returns>
 private LightBeam.BeamType convertType(lightType convertTarget)
 {
     if (convertTarget == lightType.LASER)
     {
         return(LightBeam.BeamType.LASER);
     }
     else if (convertTarget == lightType.WIDE)
     {
         return(LightBeam.BeamType.WIDE);
     }
     else
     {
         return(LightBeam.BeamType.REVEAL);
     }
 }
예제 #5
0
        public dungeonFeature(
            tileType _tile              = tileType.NOTHING,
            dungeonLayers _layer        = dungeonLayers.NO_LAYER,
            short _startProbability     = 0,
            short _probabilityDecrement = 0,
            ulong _flags                      = 0,
            string _description               = "",
            lightType _lightFlare             = lightType.NO_LIGHT,
            color _flashColor                 = null, // its ok
            short _effectRadius               = 0,
            tileType _propagationTerrain      = tileType.NOTHING,
            dungeonFeatureTypes _subsequentDF = (dungeonFeatureTypes)0,             // ??
            bool _messageDisplayed            = false
            )
        {
            tile                 = _tile;
            layer                = _layer;
            startProbability     = _startProbability;
            probabilityDecrement = _probabilityDecrement;
            flags                = _flags;
            description          = _description;

            lightFlare = _lightFlare;
            flashColor = _flashColor;
            if (flashColor == null)
            {
                flashColor = Global.black;
                //Debug.LogError( "dungeonFeature flashColor not initialized :"  + tile );
            }


            effectRadius       = _effectRadius;
            propagationTerrain = _propagationTerrain;
            subsequentDF       = _subsequentDF;
            messageDisplayed   = _messageDisplayed;
        } // constructure
예제 #6
0
		public readonly string flavorText = "" ;  // = new char [COLS];

		public floorTileType(
			ushort _displayChar = 0 ,
			color _foreColor = null,
			color _backColor = null,
			short _drawPriority =0,
			int _chanceToIgnite =0,
			dungeonFeatureTypes _fireType = (dungeonFeatureTypes)0,
			dungeonFeatureTypes _discoverType = (dungeonFeatureTypes)0,
			dungeonFeatureTypes _promoteType = (dungeonFeatureTypes)0 ,
			short _promoteChance = 0,
			lightType _glowLight = lightType.NO_LIGHT ,
			ulong _flags =0,
			ulong _mechFlags =0,
			string _description = "" , //  = new char [COLS];
			string _flavorText = "" 
		) { 

			displayChar = _displayChar ;
			foreColor = _foreColor ;
			backColor = _backColor ;
			drawPriority = _drawPriority ;
			chanceToIgnite = _chanceToIgnite ;
			fireType = _fireType ;
			discoverType = _discoverType ;
			promoteType = _promoteType ;
			promoteChance = _promoteChance ;
			glowLight = (short)_glowLight ;
			flags = _flags ;
			mechFlags = _mechFlags ;
			if(_description != null)
				description = _description ;
			if(_flavorText!=null)
				flavorText = _flavorText ;


		} // constructure  
예제 #7
0
 /// <summary>
 /// Will Set the current light type to given lightType
 /// </summary>
 /// <param name="newType">light Type that could be used</param>
 public void setLightType(lightType newType)
 {
     type = newType;
 }
예제 #8
0
 /// <summary>
 /// Will Set the current light type to given lightType
 /// </summary>
 /// <param name="newType">newType light Type that could be used</param>
 public void setLightType(LightBeam.BeamType newType)
 {
     type = convertType(newType);
 }