34 lines
863 B
C#
34 lines
863 B
C#
|
|
using UnityEngine;
|
||
|
|
using System.Collections;
|
||
|
|
using Pixelplacement;
|
||
|
|
using Input;
|
||
|
|
|
||
|
|
|
||
|
|
public class TakePhotoState : State
|
||
|
|
{
|
||
|
|
public Transform playerTargetObject;
|
||
|
|
private GameObject playerCharacter;
|
||
|
|
private PlayerTouchController playerTouchController;
|
||
|
|
private Vector2 newPlayerPosition;
|
||
|
|
|
||
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
// Update is called once per frame
|
||
|
|
void Update()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void OnEnable()
|
||
|
|
{
|
||
|
|
playerCharacter = GameObject.FindWithTag("Player");
|
||
|
|
playerTouchController = playerCharacter.GetComponent<PlayerTouchController>();
|
||
|
|
newPlayerPosition = new Vector2(playerCharacter.transform.position.x, playerCharacter.transform.position.y);
|
||
|
|
playerTouchController.MoveDirectlyTo(newPlayerPosition);
|
||
|
|
}
|
||
|
|
}
|