public void Init(Transform followRootBone, Transform mainObj, int index, GhostFollow nextGhost) { m_nextGhost = nextGhost; AutoChangeMaterial(index); int delay = 3; float timescale = 1.0f; if (Application.targetFrameRate >= 60) { timescale = 2.0f; } else if (Application.targetFrameRate >= 45) { timescale = 1.5f; } else if (Application.targetFrameRate >= 30) { timescale = 1.0f; } m_followRootBone = followRootBone; m_mainObj = mainObj; // m_nextCaptureTime = Time.time + 3 + index * m_autoCaptureTime; m_delayKeyCount = (int)(delay * (index + 1) * timescale); //dex * delay + index * index*2) * timescale); for (int i = 0; i < m_delayKeyCount; i++) { TransformData td; td.localRotation = Quaternion.identity; td.localPosition = Vector3.zero; td.localScale = Vector3.one; m_mainObjTransforms.Add(td); } Init_(m_selfRootBone, m_followRootBone); }
public GhostFollow() { if (_instance != null) { return; } _instance = this; _idleReference = GhostIdle.Instance; }
public GhostIdle() { if (_instance != null) { return; } _instance = this; _followReference = GhostFollow.Instance; }