// Use this for initialization void Start() { width = showState.GetComponent <RectTransform>().rect.width; height = showState.GetComponent <RectTransform>().rect.height; magic = MagicCore.Instance; it = (ItemName)Random.Range(0, (int)ItemName.count); Ibuff = magic.itemTool.getItem(it); monster = new Monster(); mouse = new mouseevent(); lineGameObjectlist = new List <GameObject>(); isDrag = false; isAttacking = false; isShow = false; instance = node; //三个结算物品 overCount = 3; magic.addMonster(monster0.GetComponent <Monster>()); magic.startTurn(); //初始化节点位置 InitPointPos(); //初始化连线 InitLine(); }
void InitializeMonster(MonsterType m) { if (m == MonsterType.Empty) { return; } if (m == MonsterType.Slime) { Slime temp = new Slime(); temp.Start(); temp.Setmtype(MonsterType.Slime); Monster tempMonster = temp; magic.addMonster(tempMonster); } if (m == MonsterType.DoubleSwordMan) { DoubleSwordMan temp = new DoubleSwordMan(); temp.Start(); temp.Setmtype(MonsterType.DoubleSwordMan); Monster tempMonster = temp; magic.addMonster(tempMonster); } if (m == MonsterType.BigSpider) { BigSpider temp = new BigSpider(); temp.Start(); temp.Setmtype(MonsterType.BigSpider); Monster tempMonster = temp; magic.addMonster(tempMonster); } if (m == MonsterType.Vampire) { Vampire temp = new Vampire(); temp.Start(); temp.Setmtype(MonsterType.Vampire); Monster tempMonster = temp; magic.addMonster(tempMonster); } if (m == MonsterType.Boss_TurnMan) { Boss_TurnMan temp = new Boss_TurnMan(); temp.Start(); temp.Setmtype(MonsterType.Boss_TurnMan); Monster tempMonster = temp; magic.addMonster(tempMonster); } }