Exemple #1
0
 ItemModel itemModel; //道具的单例
 // Use this for initialization
 void Start()
 {
     grid      = Resources.Load <GameObject>("item"); //从resources文件夹读取道具的预制物
     content   = GameObject.Find("Content").gameObject;
     itemModel = ItemModel.GetInstance();
     OpenBag();
 }
Exemple #2
0
 public GameObject story5; //剧情
 // Use this for initialization
 void Start()
 {
     itemInfo    = GameObject.FindGameObjectWithTag("ItemInfo");
     name        = itemInfo.transform.FindChild("nameInf").FindChild("name").GetComponent <Text>();
     anim        = itemInfo.GetComponent <Animator>();
     gridScript  = GetComponent <Grid>();
     itemModel   = ItemModel.GetInstance();
     playerModel = PlayerModel.GetInstance();
     playerPos   = PlayerPos.GetInstance();
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     monsterModel = MonsterModel.GetInstance();
     itemModel    = ItemModel.GetInstance();
     magicModel   = MagicModel.GetInstance();
     playerModel  = PlayerModel.GetInstance();
     OnXmlLoadEnemy();
     OnXmlLoadItem();
     OnXmlLoadPlayer();
     OnXmlLoadMagic();
 }
 // Use this for initialization
 void Start()
 {
     player              = GameObject.Find("luna");
     anim                = GetComponent <Animator>();
     turn                = GameObject.Find("GameControl").GetComponent <TurnSwitch>();
     takedamage          = GameObject.Find("GameControl").GetComponent <TakeDamage>();
     characterController = player.GetComponent <CharacterController>();
     playerModel         = PlayerModel.GetInstance();
     monsterInfo         = gameObject.GetComponent <MonsterInfo>();
     itemModel           = ItemModel.GetInstance();
     bag             = GameObject.Find("Bag").GetComponent <Bag>();
     ico             = GameObject.Find("GetItem").transform.FindChild("ItemInfo").FindChild("frame").FindChild("ico").GetComponent <Image>();
     name            = GameObject.Find("GetItem").transform.FindChild("ItemInfo").FindChild("nameInfo").FindChild("name").GetComponent <Text>();
     explain         = GameObject.Find("GetItem").transform.FindChild("ItemInfo").FindChild("explain").FindChild("explainText").GetComponent <Text>();
     bgmBattle       = GameObject.Find("BGM_battleNormal").GetComponent <AudioSource>();
     BGM_cench       = GameObject.Find("BGM_cench").GetComponent <AudioSource>();
     getSound        = GameObject.Find("GetSound").GetComponent <AudioSource>();
     lightPunchAudio = GameObject.Find("LightPunchAudio").GetComponent <AudioSource>();
 }
Exemple #5
0
 // Use this for initialization
 void Start()
 {
     itemModel = ItemModel.GetInstance();
     bag       = GameObject.Find("Bag").GetComponent <Bag>();
 }