poprawki materialy unity 6, pajaki, podmiana katalogu FSM w AIControlerze, zmiana w Spider 2.0 Behaviours , skopane zycie bylo, ladowalo pajaka z zyciem 2.
This commit is contained in:
25
Assets/ThirdParty/Invector-AIController/Scenes/AI-Revive/Scripts/SetRandomPosition.cs
vendored
Normal file
25
Assets/ThirdParty/Invector-AIController/Scenes/AI-Revive/Scripts/SetRandomPosition.cs
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SetRandomPosition : MonoBehaviour
|
||||
{
|
||||
public Transform[] possiblePoints;
|
||||
|
||||
System.Random random;
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
random = new System.Random(Random.Range(0, GetInstanceID()));
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
public void SetRandomPositionToTransform(Transform target)
|
||||
{
|
||||
Transform newTarget = possiblePoints[random.Next(possiblePoints.Length)];
|
||||
if(newTarget)
|
||||
{
|
||||
target.SetPositionAndRotation(newTarget.position, newTarget.rotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Assets/ThirdParty/Invector-AIController/Scenes/AI-Revive/Scripts/SetRandomPosition.cs.meta
vendored
Normal file
18
Assets/ThirdParty/Invector-AIController/Scenes/AI-Revive/Scripts/SetRandomPosition.cs.meta
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b63ed9920cc3865468091ffbf56aa6e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 123618
|
||||
packageName: Invector FSM AI Template
|
||||
packageVersion: 1.1.9a
|
||||
assetPath: Assets/Invector-FSMAIController/Scenes/AI-Revive/Scripts/SetRandomPosition.cs
|
||||
uploadId: 601882
|
||||
Reference in New Issue
Block a user