SemanticBehaviour.cs 632 Bytes
Newer Older
1
using UnityEngine;
2
using SimpleJSON;
3
using System.Collections.Generic;
4
5
6
7
8

namespace dlu
{

[RequireComponent(typeof(InstanceIdentifier))]
9
public abstract class SemanticBehaviour : MonoBehaviour
10
11
{
    public string is_a;
12
13

    public abstract void WriteTo(JSONObject jsonObject);
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

    protected List<Vector3> positionHistory;
    protected List<Quaternion> rotationHistory;

    public (List<Vector3>, List<Quaternion>) GetLog()
    {
        return (positionHistory, rotationHistory);
    }

    protected void Update()
    {
        positionHistory.Add(transform.position);
        rotationHistory.Add(transform.rotation);
    }

29
30
31
}

}