Merge pull request #4763 from aws-lumberyard-dev/scripting/fixes

Removed outdated and unused ScriptCanvas files
monroegm-disable-blank-issue-2
Luis Sempé 4 years ago committed by GitHub
commit eac14901b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,81 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "DateTime.h"
namespace ScriptCanvas
{
namespace Nodes
{
namespace Time
{
///////////////
// DateTime
///////////////
DateTime::DateTime()
: Node()
, m_tickCounter(0)
, m_tickOrder(AZ::TICK_DEFAULT)
{
}
void DateTime::OnDeactivate()
{
AZ::TickBus::Handler::BusDisconnect();
AZ::SystemTickBus::Handler::BusDisconnect();
}
void DateTime::OnInputSignal(const SlotId&)
{
m_tickCounter = DateTimeProperty::GetTicks(this);
if (m_tickCounter >= 0)
{
if (!AZ::SystemTickBus::Handler::BusIsConnected())
{
AZ::SystemTickBus::Handler::BusConnect();
}
}
}
void DateTime::OnSystemTick()
{
AZ::SystemTickBus::Handler::BusDisconnect();
if (!AZ::TickBus::Handler::BusIsConnected())
{
AZ::TickBus::Handler::BusDisconnect();
}
m_tickOrder = DateTimeProperty::GetTickOrder(this);
AZ::TickBus::Handler::BusConnect();
}
void DateTime::OnTick(float deltaTime, AZ::ScriptTimePoint timePoint)
{
--m_tickCounter;
if (m_tickCounter <= 0)
{
const SlotId outSlot = DateTimeProperty::GetOutSlotId(this);
SignalOutput(outSlot);
AZ::TickBus::Handler::BusDisconnect();
}
}
int DateTime::GetTickOrder()
{
return m_tickOrder;
}
}
}
}
#include <Include/ScriptCanvas/Libraries/Time/DateTime.generated.cpp>

@ -1,82 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <ScriptCanvas/Core/Node.h>
#include <ScriptCanvas/Core/Graph.h>
#include <ScriptCanvas/CodeGen/CodeGen.h>
#include <AzCore/Component/TickBus.h>
#include <Include/ScriptCanvas/Libraries/Time/DateTime.generated.h>
#include <AzCore/RTTI/TypeInfo.h>
namespace ScriptCanvas
{
namespace Nodes
{
namespace Time
{
class DateTime
: public Node
, AZ::TickBus::Handler
, AZ::SystemTickBus::Handler
{
ScriptCanvas_Node(DateTime,
ScriptCanvas_Node::Name("Date Time")
ScriptCanvas_Node::Uuid("")
ScriptCanvas_Node::Description("")
);
public:
DateTime();
void OnDeactivate() override;
void OnInputSignal(const SlotId&) override;
// SystemTickBus
void OnSystemTick() override;
////
// TickBus
void OnTick(float deltaTime, AZ::ScriptTimePoint timePoint) override;
int GetTickOrder() override;
////
protected:
// Inputs
ScriptCanvas_In(ScriptCanvas_In::Name("In", "When signaled, execution is delayed at this node for the specified amount of frames.")
ScriptCanvas_In::Contracts({ DisallowReentrantExecutionContract }));
// Outputs
ScriptCanvas_OutLatent(ScriptCanvas_OutLatent::Name("Out", "Signaled after waiting for the specified amount of frames."));
// Data
ScriptCanvas_PropertyWithDefaults(int, 1,
ScriptCanvas_Property::Name("Ticks", "The amount of ticks that need to occur before exeuction triggers")
ScriptCanvas_Property::Input
ScriptCanvas_Property::Default
);
ScriptCanvas_PropertyWithDefaults(int, static_cast<int>(AZ::TICK_DEFAULT),
ScriptCanvas_Property::Name("Tick Order", "Where in the Tick Order this delay should happen")
ScriptCanvas_Property::Input
ScriptCanvas_Property::Default
);
private:
int m_tickCounter;
int m_tickOrder;
};
}
}
}
Loading…
Cancel
Save