2013-08-30 22:23:05 +09:00
|
|
|
//
|
|
|
|
// Tracer.h
|
|
|
|
// OpenSpades
|
|
|
|
//
|
|
|
|
// Created by Tomoaki Kawada on 8/30/13.
|
|
|
|
// Copyright (c) 2013 yvt.jp. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-08-07 23:51:05 +09:00
|
|
|
#include "ILocalEntity.h"
|
2016-12-03 18:49:07 +09:00
|
|
|
#include <Core/Math.h>
|
2019-07-20 13:48:49 +09:00
|
|
|
#include <Core/RefCountedObject.h>
|
2013-08-30 22:23:05 +09:00
|
|
|
|
|
|
|
namespace spades {
|
|
|
|
namespace client {
|
|
|
|
class Client;
|
|
|
|
class IImage;
|
2016-12-03 18:23:47 +09:00
|
|
|
class Tracer : public ILocalEntity {
|
2019-08-08 01:09:22 +09:00
|
|
|
Client &client;
|
2019-07-20 13:48:49 +09:00
|
|
|
Handle<IImage> image;
|
2013-08-30 22:23:05 +09:00
|
|
|
Vector3 startPos, dir;
|
|
|
|
float length;
|
|
|
|
float curDistance;
|
|
|
|
float visibleLength;
|
|
|
|
float velocity;
|
|
|
|
bool firstUpdate;
|
2016-12-03 18:23:47 +09:00
|
|
|
|
2013-08-30 22:23:05 +09:00
|
|
|
public:
|
2019-08-08 01:09:22 +09:00
|
|
|
Tracer(Client &, Vector3 p1, Vector3 p2, float bulletVel);
|
2017-01-05 03:48:11 +09:00
|
|
|
~Tracer();
|
2016-12-03 18:23:47 +09:00
|
|
|
|
2017-01-05 03:48:11 +09:00
|
|
|
bool Update(float dt) override;
|
|
|
|
void Render3D() override;
|
2013-08-30 22:23:05 +09:00
|
|
|
};
|
2019-08-07 23:51:05 +09:00
|
|
|
} // namespace client
|
|
|
|
} // namespace spades
|