// Use this for initialization void Start() { gameObject.name += MGGlobalDataCenter.defaultCenter().dartIndex.ToString(); MGGlobalDataCenter.defaultCenter().dartIndex = (MGGlobalDataCenter.defaultCenter().dartIndex + 1) % (MGSkillDartInfo.skillHoldLevel * MGSkillRoadblockInfo.skillHoldLevel); direction = Vector3.left; timestamp = MGGlobalDataCenter.timestamp(); mgNetWorking = GameObject.Find("NetWork").GetComponent <MGNetWorking>(); //获取播放器对象 isPlayDart = false; releaseSkillObjectName = "role"; MGGlobalDataCenter.defaultCenter().isDartRelease = true; MGNotificationCenter.defaultCenter().addObserver(this, triggerFunc, SkillEnum.dart + gameObject.name); }