Ultraviolet

This commit is contained in:
dart 2022-04-03 04:02:28 +03:00
parent 3496ee8357
commit 0cb9fa092f
8 changed files with 210 additions and 30 deletions

View File

@ -11,6 +11,7 @@ GameObject:
- component: {fileID: 4291895258293432843}
- component: {fileID: 4864008898460965936}
- component: {fileID: 6102265118150421119}
- component: {fileID: 3579090901325787678}
m_Layer: 0
m_Name: Square
m_TagString: Untagged
@ -73,7 +74,7 @@ SpriteRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 0.2901961}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
@ -109,6 +110,21 @@ BoxCollider2D:
serializedVersion: 2
m_Size: {x: 0.9983634, y: 1}
m_EdgeRadius: 0
--- !u!114 &3579090901325787678
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6196285449860538992}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 49f585561ea104de189705939209031c, type: 3}
m_Name:
m_EditorClassIdentifier:
beam: {fileID: 6196285449860538992}
rotationSpeed: 25
damage: 75
--- !u!1 &6863736067666425520
GameObject:
m_ObjectHideFlags: 0
@ -118,7 +134,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 4220328572880531123}
- component: {fileID: 7866767662200354342}
m_Layer: 0
m_Name: Ultraviolet
m_TagString: Untagged
@ -141,18 +156,3 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7866767662200354342
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6863736067666425520}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 49f585561ea104de189705939209031c, type: 3}
m_Name:
m_EditorClassIdentifier:
beam: {fileID: 6196285449860538992}
rotationSpeed: 1
damage: 0

View File

@ -116,7 +116,7 @@ GameObject:
- component: {fileID: 3826968412464473223}
m_Layer: 0
m_Name: character
m_TagString: Untagged
m_TagString: Character
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -177,6 +177,7 @@ MonoBehaviour:
health: 250
damage: 10
moveSpeed: 0.02
characterSprite: {fileID: 1199223373439478175}
--- !u!50 &3826968412464473223
Rigidbody2D:
serializedVersion: 4

View File

@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 6002007055176810599}
m_Layer: 0
m_Name: mob
m_TagString: Untagged
m_TagString: Mob
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -30,6 +30,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2700851981640547900}
- {fileID: 2000198170162216571}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -74,8 +75,106 @@ MonoBehaviour:
characterObject: {fileID: 0}
overMind: {fileID: 0}
moveSpeed: 0
health: 0
damage: 0
minDist: 0
maxDist: 0
healthText: {fileID: 137025635224367671}
--- !u!1 &6229468810324473755
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2000198170162216571}
- component: {fileID: 3384844912060217320}
- component: {fileID: 137025635224367671}
m_Layer: 0
m_Name: New Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2000198170162216571
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6229468810324473755}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.92, z: 0}
m_LocalScale: {x: 0.12094, y: 0.12094, z: 0.12094}
m_Children: []
m_Father: {fileID: 5020074052172004519}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &3384844912060217320
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6229468810324473755}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!102 &137025635224367671
TextMesh:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6229468810324473755}
m_Text: Hello World
m_OffsetZ: 0
m_CharacterSize: 1
m_LineSpacing: 1
m_Anchor: 4
m_Alignment: 1
m_TabSize: 4
m_FontSize: 0
m_FontStyle: 0
m_RichText: 1
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_Color:
serializedVersion: 2
rgba: 4294967295
--- !u!1 &6540482753690656168
GameObject:
m_ObjectHideFlags: 0

View File

@ -927,6 +927,8 @@ MonoBehaviour:
pullSize: 20
characterObject: {fileID: 1869821414}
mobMoveSpeed: 0.2
mobHealth: 100
mobDamage: 20
mobPull: {fileID: 679042026}
activeMobs: {fileID: 1560770443}
--- !u!4 &1682053527
@ -945,6 +947,71 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1785741448
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1869821417}
m_Modifications:
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalPosition.x
value: -1.8834
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalPosition.y
value: 0.72714
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalPosition.z
value: -2.1158
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4220328572880531123, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6863736067666425520, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: m_Name
value: Ultraviolet
objectReference: {fileID: 0}
- target: {fileID: 7866767662200354342, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: damage
value: 150
objectReference: {fileID: 0}
- target: {fileID: 7866767662200354342, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
propertyPath: rotationSpeed
value: 25
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bc5b45bd6fa94ff02acf62aa17c345a1, type: 3}
--- !u!1 &1786254377
GameObject:
m_ObjectHideFlags: 0

View File

@ -19,7 +19,7 @@ void Start()
void Update()
{
//beam.transform.rotation.eulerAngles += new Vector3(0, 0 0.2f);
beam.transform.Rotate(new Vector3(0,0,1), rotationSpeed * Time.deltaTime);
transform.Rotate(new Vector3(0,0,1), rotationSpeed * Time.deltaTime);
}
void OnTriggerEnter2D(Collider2D col)

View File

@ -1,5 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor.Animations;
using UnityEngine;
public class Character : MonoBehaviour
@ -8,6 +10,8 @@ public class Character : MonoBehaviour
[SerializeField] private float damage;
[SerializeField] private float moveSpeed;
[SerializeField] private GameObject characterSprite;
[SerializeField] private Animator characterAnimator;
private float horInpt;
private float verInpt;
@ -18,9 +22,9 @@ public struct StatReturn
public float MoveSpeed;
}
// Start is called before the first frame update
void Start()
private void Start()
{
characterAnimator = characterSprite.GetComponent<Animator>();
}
// Update is called once per frame
@ -30,16 +34,21 @@ void Update()
verInpt = Input.GetAxis("Vertical");
if (-0.1f > horInpt || horInpt > 0.1f)
{
characterAnimator.SetBool("IsRun", true);
transform.position += new Vector3(horInpt * moveSpeed,0,0);
if(horInpt > 0 && characterSprite.transform.localScale.x > 0)
if (horInpt > 0)
{
characterSprite.transform.localScale = new Vector3(-1, 0, 0);
characterSprite.transform.localScale = new Vector3(1, 1, 1);
}
if (horInpt < 0 && characterSprite.transform.localScale.x < 0)
if (horInpt < 0)
{
characterSprite.transform.localScale = new Vector3(1, 0, 0);
characterSprite.transform.localScale = new Vector3(-1, 1, 1);
}
}
else
{
characterAnimator.SetBool("IsRun", false);
}
if (-0.1f > verInpt || verInpt > 0.1f)
{
transform.position += new Vector3(0,verInpt * moveSpeed,0);

View File

@ -9,6 +9,8 @@ public class Mob : MonoBehaviour
{
[SerializeField] private GameObject characterObject;
[SerializeField] private OverMind overMind;
[SerializeField] private Sprite mobAnimController;
[SerializeField] private Sprite mobDeathAnimController;
[SerializeField] private float moveSpeed;
[SerializeField] private float health;
@ -32,7 +34,7 @@ void Update()
overMind.DeathGoToPull(gameObject);
}
healthText.text = health.ToString(CultureInfo.InvariantCulture);
healthText.text = health.ToString();
//transform.LookAt(characterObject.transform);
if (Vector3.Distance(transform.position, characterObject.transform.position) >= minDist)
@ -82,6 +84,8 @@ void OnTriggerEnter2D(Collider2D col)
if (col.gameObject.CompareTag("Character"))
{
characterObject.GetComponent<Character>().SendMessage("ApplyDamage", damage);
// mobAnimController = mobDeathAnimController;
overMind.DeathGoToPull(gameObject);
}
// Debug.Log("PIZDAAAAAA");

View File

@ -72,7 +72,7 @@ AnimationClip:
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0