Bouton de sorts automatique

This commit is contained in:
Crom (Thibaut CHARLES) 2015-03-05 23:54:33 +01:00
parent d753d87fbc
commit c7a7ddbe65
35 changed files with 161 additions and 69 deletions

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a2ee9314016f134459698e3866dd5790
folderAsset: yes
timeCreated: 1425593865
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -30,22 +30,22 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: -1 aniso: 16
mipBias: -1 mipBias: -1
wrapMode: -1 wrapMode: 1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 0 alphaIsTransparency: 1
textureType: -1 textureType: 8
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
sprites: [] sprites: []

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -30,22 +30,22 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: -1 aniso: 16
mipBias: -1 mipBias: -1
wrapMode: -1 wrapMode: 1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 0 alphaIsTransparency: 1
textureType: -1 textureType: 8
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
sprites: [] sprites: []

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -30,22 +30,22 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: -1 aniso: 16
mipBias: -1 mipBias: -1
wrapMode: -1 wrapMode: 1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 0 alphaIsTransparency: 1
textureType: -1 textureType: 8
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
sprites: [] sprites: []

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -30,22 +30,22 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: -1 aniso: 16
mipBias: -1 mipBias: -1
wrapMode: -1 wrapMode: 1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 0 alphaIsTransparency: 1
textureType: -1 textureType: 8
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
sprites: [] sprites: []

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -30,22 +30,22 @@ TextureImporter:
maxTextureSize: 2048 maxTextureSize: 2048
textureSettings: textureSettings:
filterMode: -1 filterMode: -1
aniso: -1 aniso: 16
mipBias: -1 mipBias: -1
wrapMode: -1 wrapMode: 1
nPOTScale: 1 nPOTScale: 0
lightmap: 0 lightmap: 0
rGBM: 0 rGBM: 0
compressionQuality: 50 compressionQuality: 50
spriteMode: 0 spriteMode: 1
spriteExtrude: 1 spriteExtrude: 1
spriteMeshType: 1 spriteMeshType: 1
alignment: 0 alignment: 0
spritePivot: {x: .5, y: .5} spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0} spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100 spritePixelsToUnits: 100
alphaIsTransparency: 0 alphaIsTransparency: 1
textureType: -1 textureType: 8
buildTargetSettings: [] buildTargetSettings: []
spriteSheet: spriteSheet:
sprites: [] sprites: []

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 00e2af6c63dfa2a4781ac59573a7a0ae guid: ab83de13d4659f84ca93d4d31fad16d0
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 3bb12dca988ff874f87f55a848f3cc83 guid: dd37b90355c05dc4a9b3e5da46d2a0ba
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 437008696c8ebfd4da2e9a8b8c483f0f guid: a4113e4b33c0344419e7e84151998093
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: a4ad31e315acd3244901382254759209 guid: c042a61522935b24992f456bc6704336
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 2888cbe7ebb784642a964f4c7dd302ec guid: 9a209352d8c516a41a0debb9e9bf758e
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,5 @@
id _name name_strref icon _description script id _name name_strref icon _description script
0 "veille nocturne" 1 "veillee.png" "se rend invincible pendant un tour" _ 0 "veille nocturne" 1 "veillee" "se rend invincible pendant un tour" _
1 "coup de crépière" 2 "crepiere.png" "inflige 25 pv de dégats à un personnage" _ 1 "coup de crépière" 2 "crepiere" "inflige 25 pv de dégats à un personnage" _
2 "goulée de cidre" 3 "cidre.png" "soigne un personnage de 50 PV" _ 2 "goulée de cidre" 3 "cidre" "soigne un personnage de 50 PV" _
3 "omelette aux champignons" 4 "omelette.png" "rend un personnage malade pendant un tour, ne peux ni parler, ni rien faire pendant un tour" _ 3 "omelette aux champignons" 4 "omelette" "rend un personnage malade pendant un tour, ne peux ni parler, ni rien faire pendant un tour" _

View File

@ -10295,6 +10295,7 @@ GameObject:
- 222: {fileID: 893547563} - 222: {fileID: 893547563}
- 114: {fileID: 893547562} - 114: {fileID: 893547562}
- 114: {fileID: 893547561} - 114: {fileID: 893547561}
- 114: {fileID: 893547564}
m_Layer: 5 m_Layer: 5
m_Name: Button m_Name: Button
m_TagString: Untagged m_TagString: Untagged
@ -10388,6 +10389,19 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 893547559} m_GameObject: {fileID: 893547559}
--- !u!114 &893547564
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 893547559}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76b745b171184de4b9790ed6c5871a98, type: 3}
m_Name:
m_EditorClassIdentifier:
spellID: 3
ico: {fileID: 21300000, guid: 1b09e1b8c17acf847abcd18a59078ad9, type: 3}
--- !u!1 &900663497 --- !u!1 &900663497
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10784,7 +10798,7 @@ RectTransform:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 961916966} m_GameObject: {fileID: 961916966}
m_LocalRotation: {x: .0119617237, y: .78026706, z: -.0460129343, w: .623636842} m_LocalRotation: {x: .0119617246, y: .780267119, z: -.046012938, w: .623636901}
m_LocalPosition: {x: 0, y: 0, z: 6.03999615} m_LocalPosition: {x: 0, y: 0, z: 6.03999615}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
@ -15892,7 +15906,7 @@ Transform:
m_PrefabParentObject: {fileID: 0} m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1437703997} m_GameObject: {fileID: 1437703997}
m_LocalRotation: {x: 0, y: .251361459, z: 0, w: .967893243} m_LocalRotation: {x: 0, y: .251361489, z: 0, w: .967893302}
m_LocalPosition: {x: -217.623383, y: 60.3925133, z: 179.930847} m_LocalPosition: {x: -217.623383, y: 60.3925133, z: 179.930847}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
@ -16521,7 +16535,7 @@ Transform:
m_PrefabParentObject: {fileID: 400084, guid: 027c250b9f20b1e49903b3b4c633cd9d, type: 3} m_PrefabParentObject: {fileID: 400084, guid: 027c250b9f20b1e49903b3b4c633cd9d, type: 3}
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1458696782} m_GameObject: {fileID: 1458696782}
m_LocalRotation: {x: -.421016425, y: .328104585, z: .661922395, w: .526261568} m_LocalRotation: {x: -.421016455, y: .328104615, z: .661922455, w: .526261628}
m_LocalPosition: {x: -.932753563, y: -.239872217, z: .350313157} m_LocalPosition: {x: -.932753563, y: -.239872217, z: .350313157}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,26 +0,0 @@
using UnityEngine;
using System.Collections;
namespace Gui{
public class AbilityButton : UnityEngine.UI.Button, MonoBehaviour, Databind.Slave {
public int spellID;
void Start(){
onClick.AddListener(()=>{
Debug.Log("Clicked");
});
SetSpellID(spellID);
}
void SetSpellID(int _spellID){
//Set image, callback
string sIcon = Rdb.GetTable("spells").GetValue<string>(_spellID, "icon");
}
}
}

View File

@ -0,0 +1,47 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class Gui_AbilityButton : MonoBehaviour{
public int spellID;
public Sprite ico;
void Awake(){
button = GetComponent<Button>();
icon = GetComponent<Image>();
}
void Start(){
SetSpellID(spellID);
}
void SetSpellID(int _spellID){
Debug.Log("yolo");
//Set image, callback
var st = Rdb.GetTable("spells");
string sIcon = st.GetValue<string>(_spellID, "icon");
var iconImage = Resources.Load<Sprite>(sIcon);
if(iconImage==null){
Debug.LogError("Could not open "+sIcon);
}
else
icon.sprite = iconImage;
i=0;
//Execute 2da script
button.onClick.AddListener(()=>{
Debug.Log("Clicked");
});
}
private int i;
private Button button;
private Image icon;
}

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,3 +6,5 @@ MonoImporter:
executionOrder: 0 executionOrder: 0
icon: {instanceID: 0} icon: {instanceID: 0}
userData: userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,5 +1,9 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: b7086103ad8ed184bbd2bf659314d70f guid: 552dbae058841264387c73bc1c70ab31
folderAsset: yes folderAsset: yes
timeCreated: 1425579568
licenseType: Free
DefaultImporter: DefaultImporter:
userData: userData:
assetBundleName:
assetBundleVariant: