summaryrefslogtreecommitdiff
path: root/game/activityOf.h
blob: 1fc82aac1f21eefbba18e555abd53c0cecdf5752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#pragma once

#include "activity.h"
#include "vehicles/vehicle.h"

template<typename T> class Activity::Of : public Activity {
	void
	apply(Vehicle * v, TickDuration dur) override
	{
		if (auto tv = dynamic_cast<Can<T> *>(v)) {
			tv->doActivity(static_cast<T *>(this), dur);
		}
	}
};