protected override async Task OnActivatedAsync(ActorActivationDetails details) { morphType = (MorphType)details.Params[0]; Movable = true; CollisionFlags |= CollisionFlags.SkipPerPixelCollisions; await RequestMetadataAsync("Object/PowerUpMonitor"); switch (morphType) { case MorphType.Swap2: SetAnimation("Swap2"); break; case MorphType.Swap3: SetAnimation("Swap3"); break; case MorphType.ToBird: SetAnimation("Bird"); break; } for (int i = 0; i < levelHandler.Players.Count; i++) { PlayerType?playerType = GetTargetType(levelHandler.Players[i].PlayerType); switch (playerType) { case PlayerType.Jazz: PreloadMetadata("Interactive/PlayerJazz"); break; case PlayerType.Spaz: PreloadMetadata("Interactive/PlayerSpaz"); break; case PlayerType.Lori: PreloadMetadata("Interactive/PlayerLori"); break; } } }
public override void OnAttach(ActorInstantiationDetails details) { base.OnAttach(details); morphType = (MorphType)details.Params[0]; Movable = true; collisionFlags |= CollisionFlags.SkipPerPixelCollisions; RequestMetadata("Object/PowerUpMonitor"); switch (morphType) { case MorphType.Swap2: SetAnimation("Swap2"); break; case MorphType.Swap3: SetAnimation("Swap3"); break; case MorphType.ToBird: SetAnimation("Bird"); break; } for (int i = 0; i < api.Players.Count; i++) { PlayerType?playerType = GetTargetType(api.Players[i].PlayerType); switch (playerType) { case PlayerType.Jazz: PreloadMetadata("Interactive/PlayerJazz"); break; case PlayerType.Spaz: PreloadMetadata("Interactive/PlayerSpaz"); break; case PlayerType.Lori: PreloadMetadata("Interactive/PlayerLori"); break; } } }
internal static UVMorphOffset getUVMorph(FileStream fs, Header header, MorphType type) { UVMorphOffset uv = new UVMorphOffset(); uv.VertexIndex = ParserHelper.getVertexIndex(fs, header.VertexIndexSize); uv.UVOffset = ParserHelper.getFloat4(fs); uv.type = type; return(uv); }
public void morphEaseout(float _end, float _dur) { dVal = 0; delay = 0; morphFrame = 0; startVal = val; stopVal = _end; duration = _dur; type = MorphType.MORPH_EASEOUT; }
public void morphSimple(float _end, float _dur) { dVal = 0; delay = 0; morphFrame = 0; startVal = val; stopVal = _end; duration = _dur; type = MorphType.MORPH_SIMPLE; }
public void morphBubble(float _start, float _end, float _range, float _dur) { dVal = 0; delay = 0; morphFrame = 0; startVal = _start; stopVal = _end; duration = _dur; type = MorphType.MORPH_BUBBLE; range = _range; val = startVal; }
public void Stretch() { if (this.transform.localScale.y >= this.originalScale.y + this.verticalMorphRange) { this.currentMorphType = MorphType.Squish; return; } this.transform.localScale = new Vector3( this.transform.localScale.x, this.transform.localScale.y + this.morphRate, this.transform.localScale.z); }
internal bool TryCreateToken(MorphType morphKeyType, IList <Token> tokens, string word, out Token token) { token = new Token(); var foundToken = false; foreach (var morph in tokens) { if (CompareTokens(word, morph.Value)) { token = morph; foundToken = true; break; } } return(foundToken); }
public UVMorphProvider(PMXModel model, MorphType targetType) { this.bufferManager = model.BufferManager; this.targetMorph = targetType; this.model = model.Model; if (model.Model.Header.AdditionalUVCount + 2 <= (int)targetType) { return; //Does not exist at this time for additional UV } foreach (MorphData morphData in model.Model.MorphList.Morphes) { if (morphData.type == this.targetMorph) { this.Morphs.Add(morphData.MorphName, new UVMorphData(morphData)); } } }
private void SelectFunction(MorphType _morphType) { switch (_morphType) { case MorphType.融合: ModelContext = CustomFormat.MorphContextFormat(this, "min", data_inAll); break; case MorphType.相交: ModelContext = CustomFormat.MorphContextFormat(this, "max", data_inAll); break; case MorphType.相差: ModelContext = CustomFormat.MorphContextFormat(this, "Subtract", data_inAll); break; } }
public UVMorphProvider(PMXModel model, MorphType targetType) { bufferManager = model.BufferManager; targetMorph = targetType; this.model = model.Model; if (model.Model.Header.AdditionalUVCount + 2 <= (int)targetType) { return; //このとき対応した追加UVは存在しない } foreach (MorphData morphData in model.Model.MorphList.Morphes) { if (morphData.type == targetMorph) { Morphs.Add(morphData.MorphName, new UVMorphData(morphData)); } } }
public PmxMorphData CreateUVMorph(string name, int id, MorphType type, Func <Vector3, Vector4> func) { if (!Morphs.ContainsKey(id)) { Morphs[id] = new PmxMorphData() { MorphName = name, SlotType = MorphSlotType.RIP, MorphType = type, MorphArray = Enumerable.Range(0, Property.Type.OriginalData.VertexArray.Length) .Select(i => (IPmxMorphTypeData) new PmxMorphUVData() { Index = i, Uv = func((Vector4)Property.Type.OriginalData.VertexArray[i].Pos * Property.Scale) }).ToArray() }; } return(Morphs[id]); }
public override void OnAttach(ActorInstantiationDetails details) { base.OnAttach(details); morphType = (MorphType)details.Params[0]; Movable = true; collisionFlags |= CollisionFlags.SkipPerPixelCollisions; RequestMetadata("Object/PowerUpMonitor"); switch (morphType) { case MorphType.Swap2: SetAnimation("Swap2"); break; case MorphType.Swap3: SetAnimation("Swap3"); break; case MorphType.ToBird: SetAnimation("Bird"); break; } }
public override void WindowsContent(int _ID) { Event e = Event.current; //---------Node Window Context morphType = (MorphType)EditorGUI.EnumPopup(new Rect(4, 20, 110, 25), morphType, CustomFormat.enumStyle); if (morphID == 0) { morphID = CustomFormat.GetMorphID; // data_outAll[0].Shape_or_Morph_context = morphID; } if ((data_inAll[0] && data_inAll[0].Shape_or_Morph_context != "") || (data_inAll[1] && data_inAll[1].Shape_or_Morph_context != "")) { data_outAll[0].Shape_or_Morph_context = "d" + morphID; } else { data_outAll[0].Shape_or_Morph_context = ""; } EditorGUI.LabelField(new Rect(windowRect.width - 30, windowRect.height / 2 - 8, windowRect.width, 20), "d" + morphID); SelectFunction(morphType); //---------Node Window Context #region Something if (CanDragWindow) { GUI.DragWindow(); } if (e.type == EventType.repaint) { //for really time calculate position of the interface DoInterfacePos(); //for really time calculate alive of the interface DoInterfaceIsAlive(); } #endregion }
public PmxMorphData CreateUvMorph(int id, MorphType type, Func <Vector3, Vector4> func) { return(ModelData.CreateUVMorph(EntityId + "_" + id, id, type, func)); }