Skip to content

Instantly share code, notes, and snippets.

View nickyeh97's full-sized avatar

Nick Yeh nickyeh97

  • Taiwan
View GitHub Profile
using UnityEngine;
using System.Collections;
namespace DesignPattern_Bridge
{
// 定義作類別之共用介面
public abstract class Implementor
{
public abstract void OperationImp();
}
// OnPreRender/OnPostRender will not call in SRP
void OnPostRender()
{
//Debug.LogFormat("frameTimer : {0} , frameInterval : {1}", frameTimer, frameInterval);
if (isREC && (frameTimer += Time.deltaTime) > frameInterval)
{
frameTimer -= frameInterval;
frameBuffer.ReadPixels(camRect, 0, 0);
Debug.Log("EncodeToJPG Now");
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Video;
using Fungus;
/// <summary>
/// Play a video clip in the VideoPlayer.
/// </summary>
[CommandInfo("Ultrablue",
@nickyeh97
nickyeh97 / TapExplosion.ts
Last active August 17, 2025 13:08
生成一個帶有動畫的爆炸效果,3 秒後自動清除
import { _decorator, Component, EventTouch, instantiate, Node, Prefab, Animation as CCAnimation, UITransform, Vec3, AnimationClip } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('TapExplosion')
export class TapExplosion extends Component {
@property(Prefab)
explosionPrefab: Prefab = null;
@property(AnimationClip)
explosionClip: AnimationClip = null;
@property(Node)