Fix errors scripts
This commit is contained in:
parent
61ce3b75b0
commit
94879f62f5
|
@ -37,7 +37,7 @@ public class Gui_AbilityButton : MonoBehaviour{
|
||||||
string sIcon = st.GetValue<string>(abilityID, "icon");
|
string sIcon = st.GetValue<string>(abilityID, "icon");
|
||||||
var iconImage = Resources.Load<Sprite>(sIcon);
|
var iconImage = Resources.Load<Sprite>(sIcon);
|
||||||
if(iconImage==null){
|
if(iconImage==null){
|
||||||
Debug.LogError("Could not open "+sIcon);
|
Debug.LogWarning("Could not open "+sIcon);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
icon.sprite = iconImage;
|
icon.sprite = iconImage;
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
||||||
public ScrollRect scrollrect;
|
public ScrollRect scrollrect;
|
||||||
//public InputField myfield;
|
//public InputField myfield;
|
||||||
GameObject chat_input;
|
GameObject chat_input;
|
||||||
TchatAnim tchatAnim;
|
Gui_TchatAnim tchatAnim;
|
||||||
string message_old;
|
string message_old;
|
||||||
|
|
||||||
//tentative d'ajout des notifications:
|
//tentative d'ajout des notifications:
|
||||||
|
@ -38,7 +38,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
||||||
void Start() {
|
void Start() {
|
||||||
//PopulateList ();
|
//PopulateList ();
|
||||||
chat_input = GameObject.Find("tchat_complet");
|
chat_input = GameObject.Find("tchat_complet");
|
||||||
tchatAnim = chat_input.GetComponent<TchatAnim> ();
|
tchatAnim = chat_input.GetComponent<Gui_TchatAnim> ();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
||||||
void PopulateList() {
|
void PopulateList() {
|
||||||
foreach(var item in itemList) {
|
foreach(var item in itemList) {
|
||||||
GameObject newButton = Instantiate(sampleButton) as GameObject;
|
GameObject newButton = Instantiate(sampleButton) as GameObject;
|
||||||
SampleButton button = newButton.GetComponent <SampleButton> ();
|
Gui_SampleButton button = newButton.GetComponent <Gui_SampleButton> ();
|
||||||
button.nameLabel.text = item.name;
|
button.nameLabel.text = item.name;
|
||||||
button.icon.sprite = item.icon;
|
button.icon.sprite = item.icon;
|
||||||
button.message.text = item.message;
|
button.message.text = item.message;
|
||||||
|
@ -67,7 +67,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
||||||
|
|
||||||
scrollrect.verticalNormalizedPosition = 0;
|
scrollrect.verticalNormalizedPosition = 0;
|
||||||
GameObject myNewButton = Instantiate(sampleButton) as GameObject;
|
GameObject myNewButton = Instantiate(sampleButton) as GameObject;
|
||||||
SampleButton button = myNewButton.GetComponent<SampleButton> ();
|
Gui_SampleButton button = myNewButton.GetComponent<Gui_SampleButton> ();
|
||||||
button.nameLabel.text = name;
|
button.nameLabel.text = name;
|
||||||
button.message.text = tchatAnim.message;
|
button.message.text = tchatAnim.message;
|
||||||
button.icon.sprite = portrait.sprite;
|
button.icon.sprite = portrait.sprite;
|
||||||
|
@ -80,7 +80,7 @@ public class Gui_CreateScrollList : MonoBehaviour {
|
||||||
|
|
||||||
scrollrect.verticalNormalizedPosition = 0;
|
scrollrect.verticalNormalizedPosition = 0;
|
||||||
GameObject myNewButton = Instantiate(logNotification) as GameObject;
|
GameObject myNewButton = Instantiate(logNotification) as GameObject;
|
||||||
LogNotification notif = myNewButton.GetComponent<LogNotification> ();
|
Gui_LogNotification notif = myNewButton.GetComponent<Gui_LogNotification> ();
|
||||||
notif.message.text = message;
|
notif.message.text = message;
|
||||||
myNewButton.transform.SetParent(contentPanel);
|
myNewButton.transform.SetParent(contentPanel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class Gui_DayController : MonoBehaviour {
|
||||||
|
|
||||||
//appel de Window Chat
|
//appel de Window Chat
|
||||||
chatWindowScroll = GameObject.Find("ChatWindowScroll");
|
chatWindowScroll = GameObject.Find("ChatWindowScroll");
|
||||||
chatWindow = chatWindowScroll.GetComponent<ChatWindow> ();
|
chatWindow = chatWindowScroll.GetComponent<Gui_ChatWindow> ();
|
||||||
|
|
||||||
//appel de CreateScrollList
|
//appel de CreateScrollList
|
||||||
createScrollListObject = GameObject.Find("log_controller");
|
createScrollListObject = GameObject.Find("log_controller");
|
||||||
|
|
|
@ -3,12 +3,12 @@ using System.IO;
|
||||||
|
|
||||||
public class Game {
|
public class Game {
|
||||||
|
|
||||||
public void SetMainPlayer(Player p){
|
public void SetMainPlayer(Game_Player p){
|
||||||
m_mainPlayer = p;
|
m_mainPlayer = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Player GetMainPlayer(){
|
public Game_Player GetMainPlayer(){
|
||||||
return m_mainPlayer;
|
return m_mainPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ public class Game {
|
||||||
private static object m_singlmutex = new Object();
|
private static object m_singlmutex = new Object();
|
||||||
|
|
||||||
|
|
||||||
private Player m_mainPlayer = null;
|
private Game_Player m_mainPlayer = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue