public PancakeData GetData() { PancakeData data = new PancakeData(); data.score = m_PancakeScore; data.flipTime = m_TimesFlipped; data.flipPoint = m_FlipPoint; data.active = m_Running; return data; }
public void SetData(PancakeData data) { m_Running = data.active; gameObject.SetActive(data.active); if (!data.active) return; m_FlipPoint = data.flipPoint; m_TimesFlipped = data.flipTime; m_PancakeScore = data.score; /* to fix rotation when pan was removed between animation */ m_PancakeTransform.rotation = m_PancakeOriginalRotation; m_PancakeTransform.position = m_PancakeOriginalPosition; }