private void Awake() { Instance = this; // levelCoefficient = Mathf.Min(0.02285714f * PrefsManager.LastLevel, .8f); offset = 0.03f; dir = -1; lvl = GameManager.Instance.Data.GetLevelData(PrefsManager.LastLevel, ref levelCoefficient); currentSkin = GameManager.Instance.CurrentSkin; backgroundSkin = GameManager.Instance.CurrentBackgroundSkin; spawner.transform.position = new Vector2(0, currentSkin.SpawnerPosY); hitObject.position = new Vector2(0, currentSkin.HitPosY); Camera.main.backgroundColor = currentSkin.BackgroundColor; if (backgroundSkin.BackgroundTexture != null) { backGroundImage.sprite = backgroundSkin.BackgroundTexture; } // state = State.PERFECT; ShootController.OnHit += HitDetect; }
/* * private void OnTriggerEnter(Collider other) * { * if (other.tag.Equals("Note")) * { * SetDoorState(DOOR_STATE.HALF_OPEN); * } * } */ public void PlaySound() { SkinData mSkin = PlayerData.Instance.GetUseSkinData(CommonData.SKIN_TYPE.DOOR); var doorData = mSkin as DoorData; SoundManager.Instance.PlayFXSound((CommonData.SOUND_TYPE)doorData.close_sound); }
public List <SerializeTexture> GetSerialTextures(SkinData data) { return(new List <SerializeTexture>() { data.panel, data.button, data.technicalButton, data.element, data.header }); }
private void SetBackGroundImg() { SkinData mSkin = PlayerData.Instance.GetUseSkinData(CommonData.SKIN_TYPE.BACKGROUND); var backgoundData = mSkin as BackgroundData; Img_BackGround.sprite = (Sprite)Resources.Load(backgoundData.img_main, typeof(Sprite)); }
public static void SetKernel(ref SkinData data, List <Vector4> kernel) { Vector3 SSSC = new Vector3(data.SubsurfaceColor.r, data.SubsurfaceColor.g, data.SubsurfaceColor.b); Vector3 SSSFC = new Vector3(data.SubsurfaceFalloff.r, data.SubsurfaceFalloff.g, data.SubsurfaceFalloff.b); SeparableSSS.CalculateKernel(kernel, 11, SSSC, SSSFC); }
public void UpdateSkin() { SkinData sd = GameManager.Instance.Player.CurrentSkin; if (PipeType == EPipeType.Blocker) { IconImage.sprite = GameManager.Instance.BoardData.AGameBoard.GetSprite("blocker"); ValueImage.gameObject.SetActive(false); } else { //if (sd.PipeStructureType == EPipeStructureType.BackFront) //{ ValueImage.gameObject.SetActive(true); IconImage.sprite = GameManager.Instance.BoardData.AGameBoard.GetSprite(sd.BackPrefix + AColor.ToString()); IconImage.SetNativeSize(); ValueImage.sprite = GameManager.Instance.BoardData.AGameBoard.GetSprite(sd.FrontPrefix + Param.ToString()); ValueImage.SetNativeSize(); //} //else //if (sd.PipeStructureType == EPipeStructureType.Solid) //{ // ValueImage.gameObject.SetActive (false); // IconImage.sprite = GameManager.Instance.BoardData.AGameBoard.GetSprite(sd.BackPrefix + AColor.ToString() + "_" + Param.ToString()); // IconImage.SetNativeSize(); //} } }
public SkinList(BinaryReader bin) { skin_count = bin.ReadUInt32(); skin = new Dictionary <string, List <SkinData> >(); SkinData[] array = new SkinData[skin_count]; for (int i = 0; i < skin_count; i++) { array[i] = new SkinData(bin); } Array.Sort(array); for (int j = 0; j < skin_count; j++) { try { skin.Add(array[j].skin_name, new List <SkinData>()); } catch { } } for (int k = 0; k < skin_count; k++) { skin[array[k].skin_name].Add(array[k]); } }
public void LoadSkinData() { switch (Theme) { case Theme.Default: SkinData = SkinData.From(new DarkSkin()); break; case Theme.Light: SkinData = SkinData.From(new LightSkin()); break; case Theme.SkyBlue: SkinData = SkinData.From(new SkyBlueSkin()); break; case Theme.Green: SkinData = SkinData.From(new GreenSkin()); break; case Theme.Purple: SkinData = SkinData.From(new PurpleSkin()); break; case Theme.DarkOlive: SkinData = SkinData.From(new DarkOlive()); break; default: SkinData = SkinData.From(new DarkSkin()); break; } }
public object Clone() { byte[] clonedSkinData = null; byte[] clonedCapeData = null; if (SkinData != null) { clonedSkinData = new byte[SkinData.Length]; SkinData.CopyTo(clonedSkinData, 0); } if (CapeData != null) { clonedCapeData = new byte[CapeData.Length]; CapeData.CopyTo(clonedCapeData, 0); } return(new Skin { SkinId = SkinId, SkinGeometry = SkinGeometry, SkinGeometryName = SkinGeometryName, Slim = Slim, SkinData = clonedSkinData, CapeData = clonedCapeData }); }
public void Read(Stream input, OWLib.STUD stud) { using (BinaryReader reader = new BinaryReader(input, System.Text.Encoding.Default, true)) { header = reader.Read <InventoryItemHeader>(); data = reader.Read <SkinData>(); } }
// Use this for initialization void Start() { if (m_MainCamera != null) { Camera[] cams = FindObjectsOfType <Camera>(); foreach (Camera cam in cams) { if (cam.tag == "MainCamera") { m_MainCamera = FindObjectOfType <Camera>(); } break; } } m_GameManger = FindObjectOfType <ClassicGameManager>(); m_Skin = (SkinData)m_GameManger.Skin; m_Tiles = m_Skin.m_BoardTiles; if (m_GameManger == null) { Debug.LogError("No GameManager in Scene"); } else { m_Board = m_GameManger.m_Board; BuildBoard(); PlaceButtons(); ScaleBoardToScreen(); } }
public SkinList(BinaryReader bin) { this.skin_count = bin.ReadUInt32(); this.skin = new Dictionary <string, List <SkinData> >(); // 一度バッファに貯めてソートする SkinData[] buf = new SkinData[this.skin_count]; for (int i = 0; i < this.skin_count; i++) { buf[i] = new SkinData(bin); } Array.Sort(buf); // 全てのモーションを探索し、利用されているボーンを特定する for (int i = 0; i < this.skin_count; i++) { try { skin.Add(buf[i].skin_name, new List <SkinData>()); } catch { /*重複している場合はこの処理に入る*/ } } // 辞書に登録する作業 for (int i = 0; i < this.skin_count; i++) { this.skin[buf[i].skin_name].Add(buf[i]); } }
public static void setLook(this PlayerControl target, String playerName, int colorId, string hatId, string visorId, string skinId, string petId) { target.RawSetColor(colorId); target.RawSetVisor(visorId); target.RawSetHat(hatId, colorId); target.RawSetName(hidePlayerName(PlayerControl.LocalPlayer, target) ? "" : playerName); SkinData nextSkin = DestroyableSingleton <HatManager> .Instance.GetSkinById(skinId); PlayerPhysics playerPhysics = target.MyPhysics; AnimationClip clip = null; var spriteAnim = playerPhysics.Skin.animator; var currentPhysicsAnim = playerPhysics.Animator.GetCurrentAnimation(); if (currentPhysicsAnim == playerPhysics.CurrentAnimationGroup.RunAnim) { clip = nextSkin.viewData.viewData.RunAnim; } else if (currentPhysicsAnim == playerPhysics.CurrentAnimationGroup.SpawnAnim) { clip = nextSkin.viewData.viewData.SpawnAnim; } else if (currentPhysicsAnim == playerPhysics.CurrentAnimationGroup.EnterVentAnim) { clip = nextSkin.viewData.viewData.EnterVentAnim; } else if (currentPhysicsAnim == playerPhysics.CurrentAnimationGroup.ExitVentAnim) { clip = nextSkin.viewData.viewData.ExitVentAnim; } else if (currentPhysicsAnim == playerPhysics.CurrentAnimationGroup.IdleAnim) { clip = nextSkin.viewData.viewData.IdleAnim; } else { clip = nextSkin.viewData.viewData.IdleAnim; } float progress = playerPhysics.Animator.m_animator.GetCurrentAnimatorStateInfo(0).normalizedTime; playerPhysics.Skin.skin = nextSkin.viewData.viewData; if (playerPhysics.Skin.layer.material == DestroyableSingleton <HatManager> .Instance.PlayerMaterial) { PlayerControl.SetPlayerMaterialColors(colorId, playerPhysics.Skin.layer); } spriteAnim.Play(clip, 1f); spriteAnim.m_animator.Play("a", 0, progress % 1); spriteAnim.m_animator.Update(0f); if (target.CurrentPet) { UnityEngine.Object.Destroy(target.CurrentPet.gameObject); } target.CurrentPet = UnityEngine.Object.Instantiate <PetBehaviour>(DestroyableSingleton <HatManager> .Instance.GetPetById(petId).viewData.viewData); target.CurrentPet.transform.position = target.transform.position; target.CurrentPet.Source = target; target.CurrentPet.Visible = target.Visible; PlayerControl.SetPlayerMaterialColors(colorId, target.CurrentPet.rend); }
public void SetSkin(SkinData skin) { if (mySkinPrefab != null) { Destroy(mySkinPrefab.gameObject); } mySkinPrefab = Instantiate(skin.prefab, new Vector3(transform.position.x, 1.4f, transform.position.z), transform.rotation, transform); }
public void Render(SkinData skinData) { _skinData = skinData; _preview.sprite = skinData.Preview; _name.text = skinData.Name; _price.text = skinData.Price.ToString(); }
public void SetTexturesFromEdit(SkinData skinData) { skinData.panel = Serialize(panelSprite.texture); skinData.button = Serialize(buttonSprite.texture); skinData.technicalButton = Serialize(technicalButtonSprite.texture); skinData.header = Serialize(headerSprite.texture); skinData.element = Serialize(elementSprite.texture); }
public void SetSkin(SkinData skindata) { SpriteExtremity.sprite = skindata.HeadSprite; _wormBodies.Last().SpriteExtremity.sprite = skindata.TailSprite; Line.material = skindata.BodyMaterial; AllFaces = skindata.Faces; SetFace(FeelType.Normal); }
SkinData FindSkinData(SkinDataType type) { SkinData found = SearchSkinData(type); /*if (found == null) * found = SearchSkinData2018dot3(type);*/ return(found); }
private void SetCharAnim() { SkinData mSkin = PlayerData.Instance.GetUseSkinData(CommonData.SKIN_TYPE.CHAR); var charData = mSkin as CharData; Anim_Char.Rebind(); Anim_Char.SetTrigger(charData.shopani_trigger); }
public void SetCurrentSkin(SkinData skinData) { if (_buyedUID.Contains(skinData.UID) == false) { throw new ArgumentException(); } _currentUID = skinData.UID; }
public Skin(SkinData data) { Parts = new List <SkinPartInfo>(); foreach (var part in data.Parts) { Parts.Add(new SkinPartInfo(part.Part, part.Mesh)); } }
public static void SaveSkins(SkinSelector SS) { BinaryFormatter bF = new BinaryFormatter(); string path = Application.persistentDataPath + "/skins.wave"; FileStream fS = new FileStream(path, FileMode.Create); SkinData sD = new SkinData(SS); bF.Serialize(fS, sD); }
public SkinList(BinaryReader bin) { skin_count = bin.ReadUInt16(); skin_data = new SkinData[skin_count]; for (int i = 0; i < skin_count; i++) { skin_data[i] = new SkinData(bin); } }
public void LoadSkin() { SkinData sD = SaveSystemSkins.LoadSkins(); unlockedSkins[1] = sD.unlockedSkins; unlockedSkins[2] = sD.unlockedSkins2; unlockedSkins[3] = sD.unlockedSkins3; unlockedSkins[4] = sD.unlockedSkins4; }
public static void ResetSkin(SkinData data) { if (components == null) { components = new List <SkinGraphic>(); } actual_skin = data; components.ForEach((item) => { item.Skin(); }); }
public static SkinData LoadSkins() { string path = Application.persistentDataPath + "/skins.wave"; BinaryFormatter bF = new BinaryFormatter(); FileStream fS = new FileStream(path, FileMode.Open); SkinData sD = bF.Deserialize(fS) as SkinData; fS.Close(); return(sD); }
public void PlayBGM() { if (PlayerData.Instance.GetSoundSetting() == true) { SkinData mSkin = PlayerData.Instance.GetUseSkinData(CommonData.SKIN_TYPE.BACKGROUND); var backgoundData = mSkin as BackgroundData; mAudio.clip = mClip[backgoundData.id - 1]; mAudio.Play(); } }
private void OnSellButtonClicked(SkinData skinData, SkinPresenter presenter) { if (_balance.Balance < skinData.Price) { return; } _balance.Spend(skinData.Price); _skinSaved.Add(skinData); presenter.Unlock(); }
public IEnumerator <YieldInstruction> SpecialIntro(Character chara) { if (chara.Dead) { yield break; } SkinData skin = DataManager.Instance.GetSkin(chara.Appearance.Skin); yield return(CoroutineManager.Instance.StartCoroutine(ProcessBattleFX(chara, chara, skin.LeaderFX))); }
public void RefreshDesc() { int skinId = 0; switch (SelectSkinType) { case CommonData.SKIN_TYPE.CHAR: skinId = SkinCharBookSlotList[SelectIndex].SkinId; break; case CommonData.SKIN_TYPE.DOOR: skinId = SkinDoorBookSlotList[SelectIndex].SkinId; break; case CommonData.SKIN_TYPE.BACKGROUND: skinId = SkinBgBookSlotList[SelectIndex].SkinId; break; default: break; } SkinData data = DataManager.Instance.GetSkinData(SelectSkinType, skinId); var skinSkillName = data.GetSkillName(); var skinSkillData = SkillManager.Instance.GetSkillData(skinSkillName); StringBuilder desc = new StringBuilder(); desc.AppendFormat("{0}{1}", LocalizeData.Instance.GetLocalizeString("POPUP_GAME_SHOP_DESC_NAME"), data.GetLocalizeName()); desc.AppendLine(); desc.AppendLine(); desc.AppendFormat(data.GetLocalizeDesc()); desc.AppendLine(); desc.AppendLine(); if (skinSkillData.GetDesc() != "") { desc.AppendFormat(skinSkillData.GetDesc()); } SkinDesc.text = desc.ToString(); if (SelectSkinType != CommonData.SKIN_TYPE.CHAR) { SkinIcon.gameObject.SetActive(true); SkinCharIcon.gameObject.SetActive(false); CommonFunc.SetImageFile(data.GetIcon(), ref SkinIcon, false); } else { var charData = data as CharData; SkinIcon.gameObject.SetActive(false); SkinCharIcon.gameObject.SetActive(true); SkinCharIconAnim.Rebind(); SkinCharIconAnim.SetTrigger(charData.shopani_trigger); } }
public SkinList(BinaryReader bin) { this.skin_count = bin.ReadUInt32(); this.skin = new Dictionary<string, List<SkinData>>(); // 一度バッファに貯めてソートする SkinData[] buf = new SkinData[this.skin_count]; for (int i = 0; i < this.skin_count; i++) buf[i] = new SkinData(bin); Array.Sort(buf); // 全てのモーションを探索し、利用されているボーンを特定する for (int i = 0; i < this.skin_count; i++) { try { skin.Add(buf[i].skin_name, new List<SkinData>()); } catch { /*重複している場合はこの処理に入る*/ } } // 辞書に登録する作業 for (int i = 0; i < this.skin_count; i++) this.skin[buf[i].skin_name].Add(buf[i]); }