This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CyberSnake.ECS.AI.EnemyProperties; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Entities; | |
using Unity.Jobs; | |
namespace CyberSnake.ECS.AI.Armadillo.FSM | |
{ | |
// --------states------- | |
public struct IdleState : IComponentData, IEnableableComponent {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finally, we need to connect all of this together with VContainer. | |
// We create and inject the taskCompletionSource and respective task. | |
// We register our system. | |
// Finally, we register our consumer component in the scene. | |
public class GamePlayScope : LifetimeScope | |
{ | |
protected override void Configure(IContainerBuilder builder) | |
{ | |
var singletonDataSource = new UniTaskCompletionSource<SingletonData>(); | |
builder.RegisterInstance(singletonDataSource); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CyberSnake.ECS.Authoring; | |
using CyberSnake.ECS.ComponentData; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Entities; | |
using Unity.Physics; | |
namespace CyberSnake.ECS.Systems | |
{ | |
[UpdateInGroup(typeof(FixedStepSimulationSystemGroup))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
namespace Utils | |
{ | |
public class GizmoText : IDisposable | |
{ | |
private Rect rect = new Rect(5, 5, 120, 20); | |
private const int VERTICAL_STEP = 25; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
namespace SceneTransition.Demo | |
{ | |
/// <summary> | |
/// Custom Input module: | |
/// If cursor is locked, send mouse events from center of the screen. | |
/// | |
/// Found this hack here https://forum.unity.com/threads/fake-mouse-position-in-4-6-ui-answered.283748/#post-3600421 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace PaintCraft.Controllers{ | |
[RequireComponent(typeof(Camera))] | |
public class ScreenCameraController : InputController, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler { | |
... | |
void Update() | |
{ | |
UpdateDragIfNeeded(); | |
... | |
} | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright (c) 2017 Jiulong Wang | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Utils.Ease | |
{ | |
[Serializable] | |
public class EaseConfig | |
{ | |
public EaseType EaseType; | |
public float Time; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PaintCraft.Canvas.Configs; | |
using PaintCraft.Controllers; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
[RequireComponent(typeof(CanvasController))] | |
public class SecondCameraCtrl : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using DigitalRubyShared; | |
using PaintCraft.Controllers; | |
using UnityEngine; | |
public class CamControllGesture : ScreenCameraController | |
{ | |
[SerializeField] | |
private Camera _camera; |
NewerOlder