예제 #1
0
        public override void execute(float deltaTime, Entity entity)
        {
            RotationComponent rotation = entity.getComponent <RotationComponent>();

            rotation.x += 10 * deltaTime;
            rotation.y += 5 * deltaTime;
        }
예제 #2
0
    public void AssignEntity(TestPort.CubeEntity entity)
    {
        cubeEntity = entity;

        // Assign position
        TestPort.PositionComponent pc = entity.Position;
        Vector3 pos = transform.position;

        pc.x = pos.x;
        pc.y = pos.y;
        pc.z = pos.z;

        // Assign Rotation
        TestPort.RotationComponent rc = entity.Rotation;
        Vector3 rot = transform.rotation.eulerAngles;

        pc.x = pos.x;
        pc.y = pos.y;
        pc.z = pos.z;
    }