private void Release() { prefab = null; if (null != charater) { DestroyImmediate(charater); charater = null; } spriteInfo = null; aniFolder = null; bonePre = DEFAULT_BONE_PRE; }
private void DrawNoSpriteInfo() { GUILayout.BeginHorizontal(); EditorGUILayout.LabelField("没有挂载精灵脚本", GUILayout.Width(120)); if (GUILayout.Button("挂载", GUILayout.Width(120f))) { if (null != charater) { spriteInfo = charater.AddComponent <SpriteInfo>(); spriteInfo.mounts = new Transform[4]; } } GUILayout.EndHorizontal(); }
private void GetCharaterSetting() { if (null == charater) { return; } spriteInfo = charater.GetComponent <SpriteInfo>(); if (null == spriteInfo) { return; } if (null == spriteInfo.mounts || spriteInfo.mounts.Length != 4) { spriteInfo.mounts = new Transform[4]; } }
private void OnLoaded() { theInfo = rootModel.GetComponent <SpriteInfo>(); if (null == theInfo) { Debug.Log(string.Format("{0} has not set info", bodyRes)); } this.InfoRef(); CheckGetActionSet(); if (null != follower) { follower.mov = SimpleMove; follower.onDirSet = OnDirSet; follower.onFollowCompleted = OnFollowCompleted; } if (null != ragdollManager) { ragdollManager.onCompelted = this.OnRagdollComplete; } if (null != useChecker) { useChecker.onTargetSet = this.OnUseCheck; } }