Giter VIP home page Giter VIP logo

Comments (2)

MinerMinerMods avatar MinerMinerMods commented on August 24, 2024

Well you could go in and specify portal channels by making a portal Array[2] dictionary PortDict. Also if you want to use 2 cameras then you need to specify the exact active camera for checking. Anyways you check for any portal in view(This is in the code) and then get one of the item's channel ID and then find the partner by getting saving our target like this private Portal target = <the checked portal>; and prep the partner like this private Portal partner; and then check and validate that the channel has a length of 2 in its array by running 'if ((PortDict.item(target.channel).length())!=2){return 1;}' if we are still running we can check each item like this if (!(target.equals(PortDict.item(target.channel).item(i)))){partner = PortDict.item(target.channel).item(i);} then we can tell the partner to initialize a camera as its child and move it to the relative position. Deinitalize any cameras of portals where the partner has not been on screen in 40 draws for efficiency

from portals.

MinerMinerMods avatar MinerMinerMods commented on August 24, 2024

This method also allows you to change the portals in real time. However you need to add to portal.cs the function
`public int ChangeChannel(int channel){

if (channel == this.channel){
return 2;/No need to change here, Exiting/
}
bool valid = false
bool fixInvalid = true
foreach (var i in PortalDict.item(this.channel))
{
if (target.equals(PortDict.item(target.channel).item(i))){
PortDict[i] = nulll;
valid = true
}
index++;
}
if valid == false{
if (fixInvaild){
foreach(var di in PortalDict.items)
foreach(var ii in PortalDict.item(di))
{
if (target.equals(PortDict.item(di).item(ii))){
PortDict[ii] = nulll;
channel = di
valid = true
}
ii++;
}

}else{
return 3; /Invalid data, incorrect channel/
}

}
/to add more/
return 0;
}`

from portals.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.