This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
mochapine64backup/MoCha/Assets/Scripts/RunningMan.cs

40 lines
1.8 KiB
C#
Raw Normal View History

2018-04-17 14:13:50 -05:00
<EFBFBD><EFBFBD>using UnityEngine;
using System.Collections;
using System;
using PedometerU.Tests;
2018-04-17 14:13:50 -05:00
namespace Assets.SimpleAndroidNotifications
2018-04-17 14:13:50 -05:00
{
public class RunningMan : MonoBehaviour
2018-04-17 14:13:50 -05:00
{
public float m_Speed = 100f;
public float faster = 1f;
private Vector3 m_RotationDirection = Vector3.forward;
2018-04-17 14:13:50 -05:00
public void Start()
2018-04-17 14:13:50 -05:00
{
NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds(1), "Monster Chase", "You're almost there!", new Color(81f/255f, 128f/255f, 1), NotificationIcon.Heart);
2018-04-17 14:13:50 -05:00
}
public void ToggleRotationDirection()
2018-04-17 14:13:50 -05:00
{
Debug.Log ("Toggling rotation direction");
if (m_RotationDirection == Vector3.up)
{
m_RotationDirection = Vector3.down;
}
else
{
m_RotationDirection = Vector3.up;
}
2018-04-17 14:13:50 -05:00
}
void Update()
{
Time.timeScale = 5;
transform.Rotate(m_RotationDirection * (Mathf.Sin(Time.time) / 20f) * m_Speed);
}
2018-04-17 14:13:50 -05:00
}
}